Inconsistent resource_id property for different alarm types
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Vitrage |
Triaged
|
Medium
|
Unassigned |
Bug Description
On every alarm we have a vitrage_resource_id property with the vitrage_id of the resource the alarm is on. This works well from the API level through the graph and to the notifiers.
*In addition*, some alarm types define a RESOURCE_ID property as the id of the resource the alarm is on. This is not consistent between different alarm types:
- For Zabbix it is the *id* of the resource (e.g. the host name)
- For deduced alarms it is the *vitrage_id* of the resource
- Doctor alarms don't define it
Since this property is returned by vitrage topology show, it has to be consistent. Another issue to consider is that Vitrage should add properties only if their names start with vitrage_. And for id, we already have the vitrage_
Possible solutions for vitrage deduced alarms:
1. Delete the creation of resource_id property
2. Set resource_id to be the id of the resource (and not the vitrage id)
#1 is probably better, but we should make sure nobody is using the resource_id at this point.
A related bug, specific for SNMP notifier, is that in SnmpNotifier.
Reviewed: https:/ /review. openstack. org/541690 /git.openstack. org/cgit/ openstack/ vitrage/ commit/ ?id=324ab02b6ab c26ec6a51d7a4be 723afd6b2d2e14
Committed: https:/
Submitter: Zuul
Branch: master
commit 324ab02b6abc26e c6a51d7a4be723a fd6b2d2e14
Author: Ifat Afek <email address hidden>
Date: Wed Feb 7 11:53:44 2018 +0000
Partial fix for the wrong resource_id in deduced alarms bug
Quick and dirty fix for https:/ /bugs.launchpad .net/vitrage/ +bug/1747895
Should be re-fixed in Rocky.
Change-Id: I55d1ae4f8dd1e2 967b7f79732e0d0 829f960187f
Partial-Bug: #1747895