[Openstack] [Ceilometer/Heat] correct format of webhook for alarm-action
Duan, Li-Gong (Gary@HPServers-Core-OE-PSC)
li-gong.duan at hp.com
Wed Aug 27 10:04:53 UTC 2014
Thanks for your reply.
What I want to do is to define alarm action which will trigger heat to launch a stack, like executing "heat stack-create...".
And by doing this, once the condition of the alarm is met(alarm in ceilometer is triggered), the heat stack will automatically created/launched, as defined in ceilometer action.
If so, the alarms defined in ceilometer and actions(heat workflow) can be associated.
My current issue is how to specify the webhook URL for launching a heat stack in ceilometer alarm action.
If it is impossible, I have to specify alarm and policy in heat template.
> -----Original Message-----
> From: Steven Hardy [mailto:shardy at redhat.com]
> Sent: Friday, August 22, 2014 4:04 PM
> To: Duan, Li-Gong (Gary at HPServers-Core-OE-PSC)
> Cc: openstack at lists.openstack.org
> Subject: Re: [Openstack] [Ceilometer/Heat] correct format of webhook for
> On Thu, Aug 21, 2014 at 09:37:57AM +0000, Duan, Li-Gong (Gary at HPServers-
> Core-OE-PSC) wrote:
> > Hi Folks,
> > For the "ceilometer alarm-threshold-create" cmd, what is the correct
> > format of the webhook URL for alarm action, if I want to trigger a
> > template in Heat to be executed once this alarm is notified? Are there any
> > example of invoking heat template?
> Can you explain what you mean by "invoking heat template" in more detail
> The URL is expected to be the pre-signed signal URL provided by some heat
> resources, e.g the ScalingPolicy resources for AutoScaling.
> > -----------------------------
> > --alarm-action <Webhook URL>
> > URL to invoke when state transitions to alarm. May be used
> > multiple times. Defaults to None.
> > ----------------------------
> > I "google"ed for this, but most are related to Heat autoscaling and the
> > alarm is defined in Heat template directly.
> That is the primary use-case, if you want heat to spin up a new stack in
> response to an alarm, the best way to do that is probably via
> OS::Heat::AutoScalingGroup, which can scale out heat stacks, here's an
> This will scale out the "lb_server.yaml" template each time ceilometer posts
> to the pre-signed URL provided by the OS::Heat::ScalingPolicy
> However if what you actually want is for ceilometer to spin up a stack by
> interacting with the heat API directly triggering the stack create, then I think
> currently that is not possible, even if you were to create a pre-signed stack
> create call for the heat-api-cfn.
> This is because ceilometer inserts a pre-determined request body, which will
> only work with the handle_signal methods of the resources which expect to
> handle alarm signals from ceilometer:
More information about the Openstack