Aodh alarm create command unexpected output

asked 2019-01-09 22:42:33 -0500

pm gravatar image

Hi, I tried executing two commands,

  1. aodh alarm create --name cpu_usage_hi_check --type gnocchi_resources_threshold --description 'Instance running on high CPU usage' --metric cpu --threshold 70.0 --comparison-operator gt --aggregation-method mean --granularity 600 --evaluation-periods 3 --alarm-action 'log://' --resource-id 493fabc5-763c-442d-ac86-4b0db47f18eb --resource-type instance

  2. aodh alarm create --name cpu_usage_hi_check_1 --type gnocchi_resources_threshold --description 'Instance running on high CPU usage' --metric cpu --threshold 70.0 --comparison-operator gt --aggregation-method mean --granularity 300 --evaluation-periods 3 --alarm-action 'log://' --resource-id 493fabc5-763c-442d-ac86-4b0db47f18eb --resource-type instance

The only parameter change between the two is the granularity.

Running >> aodh alarm list, I get

+--------------------------------------+-----------------------------+----------------------+-------------------+----------+---------+ | alarm_id | type | name | state | severity | enabled | +--------------------------------------+-----------------------------+----------------------+-------------------+----------+---------+

| bb078936-3893-4bf7-9101-b7dc2781c3af | gnocchi_resources_threshold | cpu_usage_hi_check_1 | alarm | low | True |

| 96439128-fd30-47ac-9a58-0b25756bda20 | gnocchi_resources_threshold | cpu_usage_hi_check | insufficient data | low | True |

Can someone help me understand how is this parameter value change is resulting in a different result.

Note: I have observed the same results for 2 hours.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-01-10 02:21:16 -0500

updated 2019-01-10 02:22:32 -0500

The alarm granularity must be equal to Gnocchi's metric granularity. See the second note under Using Alarms:

I suppose your Gnocchi deployment uses the default granularity of 300. This is also the granularity of cpu_usage_hi_check_1, which is in a state of alarm.

edit flag offensive delete link more


Yes I did verify it. The granularity of Gnocchi was set to 300.

Do you believe that there must be an argument to specify the archive policy of our choice in "aodh alarm create" ? Because it seems a bit wierd to change the pipeline.yaml and polling.yaml every time.

Thank you so much

pm gravatar imagepm ( 2019-01-10 03:20:10 -0500 )edit

The archive policy is not a parameter when reading Gnocchi data, only when entering data. By default Ceilometer uses medium to store samples in Gnocchi, which is probably OK for most use cases. I guess you have to live with the configured archive policy and the corresponding granularity.

Bernd Bausch gravatar imageBernd Bausch ( 2019-01-10 03:51:07 -0500 )edit

I don't understand why Aodh can't live with a granularity that is a multiple of the archive granularity. Perhaps this is just an implementation oddity.

Bernd Bausch gravatar imageBernd Bausch ( 2019-01-10 03:54:21 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-01-09 22:42:33 -0500

Seen: 138 times

Last updated: Jan 10 '19