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

Steven Hardy shardy at redhat.com
Wed Oct 29 10:56:34 UTC 2014


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



More information about the OpenStack-dev mailing list