Ask Your Question
0

How to create a ceilometer alarm that monitors more than one meter via the command line

asked 2015-08-17 04:48:27 -0500

sanjana gravatar image

I want to create an alarm that fires when either of the two meters or one meter crosses threshold. (AND or OR operators) How can this be done via command line

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-08-17 05:05:30 -0500

Here is the example of ceilometer how ceilometer alarm fires if it reaches threshold in both function

If cpu_util goes over 50% for 1 minute, the scale_up policy is run and another web server instance is created. If the cpu_util goes below 15% for 10 minutes, then a web server is removed

cpu_alarm_high: type: OS::Ceilometer::Alarm properties: description: Scale-up if the average CPU > 50% for 1 minute meter_name: cpu_util statistic: avg period: 60 evaluation_periods: 1 threshold: 50 alarm_actions: - {get_attr: [web_server_scaleup_policy, alarm_url]} matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}} comparison_operator: gt

cpu_alarm_low: type: OS::Ceilometer::Alarm properties: description: Scale-down if the average CPU < 15% for 10 minutes meter_name: cpu_util statistic: avg period: 600 evaluation_periods: 1 threshold: 15 alarm_actions: - {get_attr: [web_server_scaledown_policy, alarm_url]} matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}} comparison_operator: lt

edit flag offensive delete link more

Comments

Can you please give the command to be used in the command line client for the above task? Also how i can be using the AND operator in this case

sanjana gravatar imagesanjana ( 2015-08-17 05:09:48 -0500 )edit

Hi Sanjana,

If u want to merge two alarm ( whatever parameter may be) use create two alrm and note their ID's combine it will make sense to ur quest"ceilometer alarm-combination-create --name test-comb --alarm_ids bfa5d625-019c-4f34-b31c-d4cfba3bae1f --alarm_ids bfa5d625-019c-4f34-b31c-d4cfba3bae1f

Maestropandy gravatar imageMaestropandy ( 2015-08-17 06:27:57 -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: 2015-08-17 04:48:27 -0500

Seen: 436 times

Last updated: Aug 17 '15