Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In ceilometer, alarm for cpu-util meter is not working?

I have created alarm for cpu-util meter but it is not working, In Resource usage under Usage Report, please see the cpu-util, Here cup-util is 0.19 %,

Project    Service  Meter        Description                  Day       Value (Avg)  Unit 
  demo      Nova    cpu_util    Average CPU utilisation     2015-06-09  0.192517552447  %

And Alarm will be trigger if cpu-util is less than 10.

 ceilometer alarm-threshold-create --name lowcpu --description "trigger if cpu util is < 10 for 2 min" --project-id 2436c6ec-fe8c-4371-939d-636b62c4744c --user-id dfbd9f354f5b480683b3cc4c4b9eca6f --alarm-action 'log:///tmp/alarm.txt' --ok-action 'log:///tmp/alarm1.txt' --insufficient-data-action 'log:///tmp/alarm1.txt' --meter-name cpu-util --period 120 --evaluation-periods 1 --statistic avg --comparison-operator lt --threshold 10.0 --repeat-actions True

I did not create alarm1.txt file in tmp, because I thinks I will create automatically, I am wrong plz let me know. I created alarm as above but I am not any alarm logs still my cup-util is less than 10 %

ceilometer-alarm-notifier logs

2015-06-09 05:39:31.768 4050 DEBUG ceilometer.openstack.common.service [-] database.sqlite_db             = oslo.sqlite log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2195
2015-06-09 05:39:31.768 4050 DEBUG ceilometer.openstack.common.service [-] database.sqlite_synchronous    = True log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2195
2015-06-09 05:39:31.769 4050 DEBUG ceilometer.openstack.common.service [-] database.use_db_reconnect      = False log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2195
2015-06-09 05:39:31.769 4050 DEBUG ceilometer.openstack.common.service [-] ******************************************************************************** log_opt_values /usr/lib/python2.7/site-packages/oslo_config/cfg.py:2197
2015-06-09 05:39:31.769 4050 DEBUG oslo_messaging._drivers.amqp [-] Pool creating new connection create /usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqp.py:92
2015-06-09 05:39:32.108 4050 INFO oslo_messaging._drivers.impl_rabbit [-] Connecting to AMQP server on 10.0.2.15:5672
2015-06-09 05:39:32.120 4050 INFO oslo_messaging._drivers.impl_rabbit [-] Connected to AMQP server on 10.0.2.15:5672
meter-acompute   20$(L) ceilometer-alarm-notifier*  21-$(L) ceilometer-alarm-eva

ceilometer-alarm-evaluator

2015-06-09 08:30:34.512 4037 DEBUG ceilometer.coordination [-] Members of group: ['718217be-2fd7-4d0f-8db2-5834642071cd'] extract_my_subset /opt/stack/ceilometer/ceilometer/coordination.py:170
2015-06-09 08:30:34.514 4037 DEBUG ceilometer.coordination [-] My subset: [<Alarm {u'alarm_actions': [u'log:///tmp/alarm.txt'], u'ok_actions': [u'log:///tmp/alarm1.txt'], u'name': u'lowcpu', u'timestamp': u'2015-06-09T05:48:35.562000', u'description': u'trigger if cpu util is < 10 for 2 min', u'time_constraints': [], u'enabled': True, u'state_timestamp': u'2015-06-09T05:48:35.562000', u'threshold_rule': {u'meter_name': u'cpu-util', u'evaluation_periods': 1, u'period': 120, u'statistic': u'avg', u'threshold': 10.0, u'query': [{u'field': u'project_id', u'value': u'2436c6ec-fe8c-4371-939d-636b62c4744c', u'op': u'eq'}], u'comparison_operator': u'lt', u'exclude_outliers': False}, u'alarm_id': u'fe90abc5-ba8d-4711-8a0d-a978fdcea0e5', u'state': u'insufficient data', u'insufficient_data_actions': [u'log:///tmp/alarm1.txt'], u'repeat_actions': True, u'user_id': u'dfbd9f354f5b480683b3cc4c4b9eca6f', u'project_id': u'2436c6ec-fe8c-4371-939d-636b62c4744c', u'type': u'threshold', u'severity': u'low'}>] extract_my_subset /opt/stack/ceilometer/ceilometer/coordination.py:174
2015-06-09 08:30:34.515 4037 INFO ceilometer.alarm.service [-] initiating evaluation cycle on 1 alarms
2015-06-09 08:30:34.515 4037 DEBUG ceilometer.alarm.service [-] evaluating alarm fe90abc5-ba8d-4711-8a0d-a978fdcea0e5 _evaluate_alarm /opt/stack/ceilometer/ceilometer/alarm/service.py:108
2015-06-09 08:30:34.515 4037 DEBUG ceilometer.alarm.evaluator.threshold [-] query stats from 2015-06-09 07:26:34.515691 to 2015-06-09 07:30:34.515691 _bound_duration /opt/stack/ceilometer/ceilometer/alarm/evaluator/threshold.py:57
2015-06-09 08:30:34.516 4037 DEBUG ceilometer.alarm.evaluator.threshold [-] stats query [{u'field': u'project_id', u'value': u'2436c6ec-fe8c-4371-939d-636b62c4744c', u'op': u'eq'}, {'field': 'timestamp', 'value': '2015-06-09T07:30:34.515691', 'op': 'le'}, {'field': 'timestamp', 'value': '2015-06-09T07:26:34.515691', 'op': 'ge'}] _statistics /opt/stack/ceilometer/ceilometer/alarm/evaluator/threshold.py:89
2015-06-09 08:30:34.906 4037 DEBUG ceilometer.alarm.evaluator.threshold [-] sanitize stats [] _sanitize /opt/stack/ceilometer/ceilometer/alarm/evaluator/threshold.py:66
2015-06-09 08:30:34.906 4037 DEBUG ceilometer.alarm.evaluator.threshold [-] pruned statistics to 0 _sanitize /opt/stack/ceilometer/ceilometer/alarm/evaluator/threshold.py:84