Ask Your Question

What should be in the POST data for a Ceilometer alarm? [closed]

asked 2014-05-06 13:25:57 -0600

rbowen gravatar image

updated 2014-06-27 15:57:04 -0600

I've created a Ceilometer alarm (Icehouse, in case it matters) with a simple php script as the alarm-action. When the alarm is triggered, it is POST'ing to the script, but the POST body is always empty.

ceilometer alarm-threshold-create --name boo --description bang --meter-name image.size --threshold 1000 --comparison-operator gt --statistic avg --period 60 --evaluation-periods 1 --alarm-action 'http://localhost/alarm.php'

I expected, based on the documentation, that it would POST something more than that - possibly some information about the value that triggered the alarm or whatever, but the docs don't appear to actually say what is POSTed to the "Webhook URL".

Is it supposed to send any data? (ie, am I likely to just be doing something wrong?)

Is the intent that it will send data in a future version? If so, can someone point me to a discussion of this functionality?


edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by koolhead17
close date 2014-06-30 06:14:58.642019

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-07 15:23:02 -0600

doyleratcisco gravatar image

updated 2014-06-27 15:56:24 -0600

rbowen gravatar image

In havana, the three alarm states of ALARM, OK and Insufficient Data post the following data to the URL:

Status is ALARM

{"current": "alarm", "alarm_id": "742873f0-97f0-4d99-87da-b5f7c7829b7f", "reason": "Remaining as alarm due to 1 samples outside threshold, most recent: 0.138333333333", "previous": "alarm"}

Status is OK

{"current": "ok", "alarm_id": "742873f0-97f0-4d99-87da-b5f7c7829b7f", "reason": "Remaining as ok due to 1 samples inside threshold, most recent: 0.138333333333", "previous": "ok"}

Status is Insufficient Data

{"current": "insufficient data", "alarm_id": "742873f0-97f0-4d99-87da-b5f7c7829b7f", "reason": "1 datapoints are unknown", "previous": "ok"}
edit flag offensive delete link more


By way of followup ... the error was actually in my PHP, rather than anywhere else. I'll try to update the Ceilometer documentation accordingly with the examples here.

rbowen gravatar imagerbowen ( 2014-06-27 15:58:01 -0600 )edit

hello, i just have a simple question here.i have set alarm action to a url - "http://localhost:8080", but i am not getting anything, i expect to get the json from the url. also is it a POST or PUT by alarm on the URL ? can i get a short script (python preferably) at like the one above alarm.php

chitranshi-shubham gravatar imagechitranshi-shubham ( 2014-11-24 06:07:15 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2014-05-06 13:25:57 -0600

Seen: 398 times

Last updated: Jun 27 '14