[openstack-dev] [Ceilometer][Heat]Defining a webhook URL for alarm-actions

david jhon djhon9813 at gmail.com
Thu Oct 30 05:26:20 UTC 2014


Hi,

Thank you Steven,

I followed templates given there in examples, created one for me(see
attached), but I am getting following error in /var/log/heat/heat-api.log
file:

2014-10-30 10:07:44.749 30476 TRACE root
2014-10-30 10:07:44.749 30476 TRACE root   File
"/usr/lib/python2.7/dist-packages/heat/openstack/common/rpc/dispatcher.py",
line 172, in dispatch
2014-10-30 10:07:44.749 30476 TRACE root     result = getattr(proxyobj,
method)(ctxt, **kwargs)
2014-10-30 10:07:44.749 30476 TRACE root
2014-10-30 10:07:44.749 30476 TRACE root   File
"/usr/lib/python2.7/dist-packages/heat/engine/service.py", line 60, in
wrapped
2014-10-30 10:07:44.749 30476 TRACE root     return func(self, ctx, *args,
**kwargs)
2014-10-30 10:07:44.749 30476 TRACE root
2014-10-30 10:07:44.749 30476 TRACE root   File
"/usr/lib/python2.7/dist-packages/heat/engine/service.py", line 368, in
validate_template
2014-10-30 10:07:44.749 30476 TRACE root     ResourceClass =
resource.get_class(res['Type'])
2014-10-30 10:07:44.749 30476 TRACE root
2014-10-30 10:07:44.749 30476 TRACE root   File
"/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 45, in
get_class
2014-10-30 10:07:44.749 30476 TRACE root     return
resources.global_env().get_class(resource_type, resource_name)
2014-10-30 10:07:44.749 30476 TRACE root
2014-10-30 10:07:44.749 30476 TRACE root   File
"/usr/lib/python2.7/dist-packages/heat/engine/environment.py", line 326, in
get_class
2014-10-30 10:07:44.749 30476 TRACE root     return
self.registry.get_class(resource_type, resource_name)
2014-10-30 10:07:44.749 30476 TRACE root
2014-10-30 10:07:44.749 30476 TRACE root   File
"/usr/lib/python2.7/dist-packages/heat/engine/environment.py", line 257, in
get_class
2014-10-30 10:07:44.749 30476 TRACE root     raise
exception.StackValidationFailed(message=msg)
2014-10-30 10:07:44.749 30476 TRACE root
2014-10-30 10:07:44.749 30476 TRACE root StackValidationFailed: Unknown
resource Type : OS::Heat::AutoScalingGroup
2014-10-30 10:07:44.749 30476 TRACE root

Why is it not supporting OS::Heat::AutoScalingGroup resource_type, Should I
move to Icehouse or Junos to get it fixed? Or there is some other reason?

Thanks in advance for any hint or suggestions.

David


On Wed, Oct 29, 2014 at 3:56 PM, Steven Hardy <shardy at redhat.com> wrote:

> On Wed, Oct 29, 2014 at 03:19:49PM +0500, david jhon wrote:
> >    Hi,
> >
> >    I am using all-in-one Havana on Ubuntu 12.04 LTS, working on
> Ceilometer
> >    and Heat. I want to launch an instance based on a threshold defined in
> >    alarm. My question is where and how am I supposed to define the
> webhook
> >    URL for --alarm-actions argument. I am creating threshold alarm with
> the
> >    following command:
> >
> >    ceilometer -k alarm-threshold-create --name tester_cpu_high
> --description
> >    'instance_too_high' --meter-name cpu_util --threshold 20.0
> >    --comparison-operator ge --statistic avg --period 30
> --evaluation-periods
> >    1 --query resource_id=bd4ec331-dfc5-4a75-b928-6d0988dfc369
>
> Hi, you may want to use the general mailing list for future usage questions
> like this, as it's not really related to development:
>
> https://wiki.openstack.org/wiki/Mailing_Lists#General_List
>
> The answer to your question is you must create the alarm inside your heat
> template, and reference a resource which provides a pre-signed URL, such as
> a ScalingPolicy resource.
>
> Here's an example template:
>
>
> https://github.com/openstack/heat-templates/blob/master/hot/autoscaling.yaml#L121
>
> If you really want to create the alarm via the ceilometer CLI for testing,
> you'll need to expose the URL of the ScalingPolicy via a stack output, like
> this:
>
>
> https://github.com/openstack/heat-templates/blob/master/hot/asg_of_servers.yaml#L78
>
> And get the output URL via "heat stack-show <stack name>"
>
> Steve
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141030/d9523c9e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scaleup.yaml
Type: application/x-yaml
Size: 1210 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141030/d9523c9e/attachment.bin>


More information about the OpenStack-dev mailing list