Ask Your Question
0

Ceilometer alarm is not triggering action

asked 2014-04-22 16:11:03 -0500

wzbbbb gravatar image

Hello everyone,

I am using the template from heat-template git repository, autoscaling.yaml, on Ubuntu 14.04, Icehouse. Controller and compute are on different nodes, using rabbit and mongodb.

I can see the alarm in alarm-history. However, no actions are triggered. Then, I manually created a new alarm to use 'log://', got the same result. Don't see any actions.

Here is the alarm-history of the manually created alarm. The one generated by the template also got alarm status, too many records to put here.

+------------------+----------------------------+----------------------------------------+
| Type             | Timestamp                  | Detail                                 |
+------------------+----------------------------+----------------------------------------+
| creation         | 2014-04-22T14:47:35.002000 | name: cpu_high                         |
|                  |                            | description: instance running hot      |
|                  |                            | type: threshold                        |
|                  |                            | rule: cpu_util > 70.0 during 3 x 60s   |
| state transition | 2014-04-22T14:47:39.679000 | state: ok                              |
| rule change      | 2014-04-22T15:20:10.449000 | rule: cpu_util > 40.0 during 3 x 60s   |
| state transition | 2014-04-22T15:20:39.853000 | state: alarm                           |
| state transition | 2014-04-22T15:24:39.914000 | state: ok                              |
| rule change      | 2014-04-22T15:33:00.056000 | alarm_actions: [u'log:///tmp/tst.txt'] |
| rule change      | 2014-04-22T15:33:47.241000 | rule: cpu_util > 40.0 during 1 x 60s   |
| state transition | 2014-04-22T15:35:39.968000 | state: alarm                           |
| state transition | 2014-04-22T15:42:39.990000 | state: ok                              |
| state transition | 2014-04-22T20:10:41.627000 | state: alarm                           |
+------------------+----------------------------+----------------------------------------+

The alarm definition:

+---------------------------+-----------------------------------------------------+
| Property                  | Value                                               |
+---------------------------+-----------------------------------------------------+
| alarm_actions             | [u'log:///tmp/tst.txt']                             |
| alarm_id                  | 15b71df4-603b-4b92-93ee-e072fbe22c11                |
| comparison_operator       | gt                                                  |
| description               | instance running hot                                |
| enabled                   | True                                                |
| evaluation_periods        | 1                                                   |
| exclude_outliers          | False                                               |
| insufficient_data_actions | []                                                  |
| meter_name                | cpu_util                                            |
| name                      | cpu_high                                            |
| ok_actions                | []                                                  |
| period                    | 60                                                  |
| project_id                | 2bc5a14904f14e16ac43d6f7bc1b0d45                    |
| query                     | resource_id == f666e7ce-46ec-4464-b0cc-f8dc7322f343 |
| repeat_actions            | False                                               |
| state                     | alarm                                               |
| statistic                 | avg                                                 |
| threshold                 | 40.0                                                |
| type                      | threshold                                           |
| user_id                   | e173e106cdc24144beaa35361a57581a                    |
+---------------------------+-----------------------------------------------------+

I only got this kind of error in ceilometer-alarm-notifier.log. This line is about the alarm created from the template. There is no error message about the alarm created manually.

2014-04-22 16:46:41.829 1994 ERROR ceilometer.alarm.service [req-d759eceb-cb01-484a-940b-ec9178f85dd4 - - - - -] Action  for alarm c74a951d-e297-4668-a652-da1b85b2d263 is unknown, cannot notify

The alarm definition:

+---------------------------+--------------------------------------------------------------------------+
| Property                  | Value                                                                    |
+---------------------------+--------------------------------------------------------------------------+
| alarm_actions             | [u'/arn%3Aopenstack%3Aheat%3A%3A2bc5a14904f14e16ac43d6f7bc1b0d45%3Astack |
|                           | s%2Fmystack%2Fc24541a1-70cc-475d-94a4-bd693cd807e7%2Fresources%2Fweb_ser |
|                           | ver_scaleup_policy?Timestamp=2014-04-21T19%3A46%3A55Z&SignatureMethod=Hm |
|                           | acSHA256&AWSAccessKeyId=2d2fcd12bfd54e4283693b94bdc216dd&SignatureVersio |
|                           | n=2&Signature=obE6uOT4EM3LV3fO%2FmFdyM3cD5i%2B3Woc8Mwdg7pHwI0%3D']       |
| alarm_id                  | c74a951d-e297-4668-a652-da1b85b2d263                                     |
| comparison_operator       | gt                                                                       |
| description               | Scale-up if the average CPU > 50% for 1 minute                           |
| enabled                   | True                                                                     |
| evaluation_periods        | 1                                                                        |
| exclude_outliers          | False                                                                    |
| insufficient_data_actions | []                                                                       |
| meter_name                | cpu_util                                                                 |
| name                      | mystack-cpu_alarm_high-kkvwhlgdt7qz                                      |
| ok_actions                | []                                                                       |
| period                    | 60                                                                       |
| project_id                | 2bc5a14904f14e16ac43d6f7bc1b0d45                                         |
| query                     | metadata.user_metadata.stack == c24541a1-70cc-475d-94a4-bd693cd807e7     |
| repeat_actions            | False                                                                    |
| state                     | ok                                                                       |
| statistic                 | avg                                                                      |
| threshold                 | 50.0                                                                     |
| type                      | threshold                                                                |
| user_id                   | e173e106cdc24144beaa35361a57581a                                         |
+---------------------------+--------------------------------------------------------------------------+

Has anyone seen this issue? Where should I check futher? What does that error message mean?

Thanks in advance!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-04-23 12:22:59 -0500

Max gravatar image

Hi, i had the same problem and it's due to the fact that the alarm_actions is incomplete. In fact the action is triggered by a webhook and so the alarm_actions value has to be a http url. To solve you have to set the heat.conf file:

# URL of the Heat waitcondition server (string value) heat_waitcondition_server_url=http://heatservername:8000/v1/waitcondition

Bye

edit flag offensive delete link more

Comments

Thanks a lot Max! Now, my alarm_actions can be generated properly. I also found related discussion from an older question.

wzbbbb gravatar imagewzbbbb ( 2014-04-23 13:27:42 -0500 )edit

I'm happy for you! Can i ask if your OpenStack configuration use the https protocol? I'm still in trouble with alarm-action and i think it's due to an authentication problem with keystone in https.

Max gravatar imageMax ( 2014-04-30 08:51:06 -0500 )edit

Hi Max, Sorry, I am not using HTTPS. You can put in your error messages here. Maybe other people have seen them. Good luck!

wzbbbb gravatar imagewzbbbb ( 2014-04-30 09:38:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-04-22 16:11:03 -0500

Seen: 1,574 times

Last updated: Apr 23 '14