aodh driver properties not consistent with ceilometer spec

Bug #1612152 reported by Yujun Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Vitrage
Fix Released
Undecided
Yujun Zhang

Bug Description

It seems the aodh properties definition in vitrage [1] is not consistent with the latest ceilometer spec [2].

The response_id is now encapsulated in `traits` and we must prepend the scope in query to make it a valid alarm condition, e.g. `query: [{u'field': u'traits.resource_id', u'type': u'string', u'value': u'...'`

But in vitrage, the resource id is parsed from key 'resource_id' [3] and always get an empty result.

Could anybody confirm whether this is a bug or not?

- [1] https://github.com/openstack/vitrage/blob/master/vitrage/datasources/aodh/properties.py#L27
- [2]
https://github.com/openstack/ceilometer/blob/master/etc/ceilometer/event_definitions.yaml#L76
- [3] https://github.com/openstack/vitrage/blob/master/vitrage/datasources/aodh/driver.py#L66

Tags: aodh vitrage
Revision history for this message
Ifat Afek (ifat-afek) wrote :

There are few ways to create Aodh alarms. The bug happens for event-alarms.
For threshold-alarm, on the other hand, the resource_id appears without the “traits” prefix, so Vitrage Aodh datasource should be able to handle both cases.

An example for creating a threshold alarm:
ceilometer alarm-threshold-create --name 'cpu_alarm' --description 'CPU utilization is above 70%' -m 'cpu_util' --period 60 --threshold 0.7 --comparison-operator gt --query 'resource_id=5f6db701-19d6-4a98-895b-8094f2bd7304'

Changed in vitrage:
status: New → Confirmed
Yujun Zhang (yujunz)
Changed in vitrage:
assignee: nobody → Yujun Zhang (yujunz)
Yujun Zhang (yujunz)
Changed in vitrage:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to vitrage (master)

Fix proposed to branch: master
Review: https://review.openstack.org/355363

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to vitrage (master)

Reviewed: https://review.openstack.org/355363
Committed: https://git.openstack.org/cgit/openstack/vitrage/commit/?id=b300f87fb2ead31b8848dcb1a815f2503dc6935d
Submitter: Jenkins
Branch: master

commit b300f87fb2ead31b8848dcb1a815f2503dc6935d
Author: Yujun Zhang <email address hidden>
Date: Mon Aug 15 15:04:11 2016 +0800

    Fix resource_id of event alarm

    Closes-Bug: #1612152
    Change-Id: I2f0c9b2b48f8b37d8e8c63b0e58e8f089056a5b3

Changed in vitrage:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.