openshift-on-openstack
openshift-on-openstack copied to clipboard
support for Aodh and Gnocchi alarms
reproduce
- deploy on rhosp10 with autoscaling: true
- issue
openstack alarm list
I expect
Alarm status to be in [ "ok", "alarm" ]
instead
Alarm status is "insufficient data"
my resolution
- replace metadata on ServerGroup with the following.
metadata: {"metering.server_group": {get_param: "OS::stack_id"}}
- create Gnocchi + Aodh alarms like this
cpu_alarm_high:
type: OS::Aodh::GnocchiAggregationByResourcesAlarm
properties:
aggregation_method: mean
metric: cpu_util
comparison_operator: gt
threshold: 50
granularity: 600
evaluation_periods: 1
resource_type: instance
enabled: {get_param: autoscaling}
alarm_actions:
- {get_attr: [scale_up_policy, alarm_url]}
query:
str_replace:
template: '{"=": {"server_group": "stack_id"}}'
params:
stack_id: {get_param: "OS::stack_id"}
Feedback welcome!
Peace, R:
Hi, For me, it's not good. No autoscalabity and I have always Alarm status is "insufficient data". Trace of aodh-evaluator.log. Always 0 statistics returned.
2017-07-04 19:06:18.921 16763 DEBUG aodh.evaluator [-] evaluating alarm d00d63bf-5a17-4eb0-b291-470138a9fb85 _evaluate_alarm /opt/stack/aodh/aodh/evaluator/init.py:257 2017-07-04 19:06:18.921 16763 DEBUG aodh.evaluator.threshold [-] query stats from 2017-07-04 19:04:18.921680 to 2017-07-04 19:06:18.921680 _bound_duration /opt/stack/aodh/aodh/evaluator/threshold.py:90 2017-07-04 19:06:18.949 16763 DEBUG aodh.evaluator.gnocchi [-] sanitize stats [] _sanitize /opt/stack/aodh/aodh/evaluator/gnocchi.py:48 2017-07-04 19:06:18.949 16763 DEBUG aodh.evaluator.gnocchi [-] pruned statistics to 0 _sanitize /opt/stack/aodh/aodh/evaluator/gnocchi.py:52
There's an issue on RHOSP10 alarms.
Essentially they don't work out out of the box. You have to fix openstack before:
- set default collection interval to 300 seconds
- verify that every metric has 5 minute granularity
See
- https://review.openstack.org/#/c/465499/
- https://access.redhat.com/solutions/2953041
@markllama ok, if it's the same as the proposed one you can close this ticket ;) @lborensky see related tickets for an official release
Related tickets:
- Bug 1471234 - Unprivileged user can't access to its Gnocchi resources created by Ceilometer https://bugzilla.redhat.com/show_bug.cgi?id=1471234
- https://review.openstack.org/#/c/482947/
@lborensky fyi https://review.openstack.org/#/c/482947/ there will be an official release