[openstack-dev] [vitrage] about aodh alarm notification

Weyl, Alexey (Nokia - IL) alexey.weyl at nokia.com
Thu Nov 24 15:50:54 UTC 2016


It seems that you will need to have a cache for that issue.
Due to the fact that AODH alarms aren’t deleted, and stay alive (in AODH) when their state is changed to ok (but in this case aren’t supposed to appear in Vitrage), and then when the state is changed back to error (‘alarm’) they are supposed to appear in Vitrage with all the data, the most simple way to do that (without touching the core processor and architecture) is by saving those alarms of AODH in cache in the AODH driver, update its data every change that arrive to the driver, and then when a notification arrives and if the state that arrived is different than OK and the state that was in the cache is OK then send an event with all the data updated in the cache to the queue, otherwise send only the data received from the oslo bus to the queue (don’t forget of course to update the cache each time an event received, and each time we call the get_all of aodh (every snapshot_interval time) we can update the data in the cache as well.

Alexey

From: dong.wenjuan at zte.com.cn [mailto:dong.wenjuan at zte.com.cn]
Sent: Thursday, November 24, 2016 11:24 AM
To: Weyl, Alexey (Nokia - IL)
Cc: Hefetz, Idan (Nokia - IL); Afek, Ifat (Nokia - IL); openstack-dev at lists.openstack.org; zhang.yujunz at zte.com.cn
Subject: 答复: RE: [openstack-dev] [vitrage] about aodh alarm notification


Hi Weyl Alexey,

Another question:
If we received the alarm.creation notification with the 'ok' state, we filter it and don't create vertex in the Graph.
The next received the alarm state_change notification, all the other alarm details are missing in the vertex.
How can I handle this? Thanks~


BR,
dwj





"Weyl, Alexey (Nokia - IL)" <alexey.weyl at nokia.com<mailto:alexey.weyl at nokia.com>>

2016-11-24 16:25

收件人

"dong.wenjuan at zte.com.cn<mailto:dong.wenjuan at zte.com.cn>" <dong.wenjuan at zte.com.cn<mailto:dong.wenjuan at zte.com.cn>>, "Afek, Ifat (Nokia - IL)" <ifat.afek at nokia.com<mailto:ifat.afek at nokia.com>>, "Hefetz, Idan (Nokia - IL)" <idan.hefetz at nokia.com<mailto:idan.hefetz at nokia.com>>, "zhang.yujunz at zte.com.cn<mailto:zhang.yujunz at zte.com.cn>" <zhang.yujunz at zte.com.cn<mailto:zhang.yujunz at zte.com.cn>>

抄送

"openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>

主题

RE: [openstack-dev] [vitrage] about aodh alarm notification







Hi Dong,

Good question, I will explain how you can handle this problem in Vitrage.

You don't need the cache mechanism here, it is much more simplier.

When you get a new alarm with get_all or by notification of 'alarm.creation' you will create the alarm with its correct data \ properties.
Then when you receive a notification of 'alarm.rule_change', 'alarm.state_transition', 'alarm.deletion' all you need to do is only to update the correct property that has changed in the aodh vertex.
Thus, When you create the Vertex in the transformer, you know the aodh uuid so you know the vitrage_id, and you can pass only the properties that you have received and want to update (and not all the properties that there in the aodh vertex). All the other properties that you haven't received that haven't changed you can pass them as None and they won't be changed in the graph.

Hope this explains everything.
If you have other questions, you are more than welcome to ask.

Best Regrads,
Alexey


From: dong.wenjuan at zte.com.cn<mailto:dong.wenjuan at zte.com.cn> [mailto:dong.wenjuan at zte.com.cn]
Sent: Thursday, November 24, 2016 9:39 AM
To: Afek, Ifat (Nokia - IL); Weyl, Alexey (Nokia - IL); Hefetz, Idan (Nokia - IL); zhang.yujunz at zte.com.cn<mailto:zhang.yujunz at zte.com.cn>
Cc: openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>
Subject: [openstack-dev] [vitrage] about aodh alarm notification


Hi Vitrages,

Currently there are four aodh alarm notifications we need to handle:
'alarm.creation', 'alarm.rule_change', 'alarm.state_transition', 'alarm.deletion'

Only the alarm.creation notification carries the alarm detail info.
So we need to cache the alarm info.
When we receive other notifications, we can fill all fields from the cache.

But if the alarm creates before vitrage servies startup, we can't get the alarm.creation notification.
So we need to get_all when vitrage services startup.
As `SnapshotsService` will get all alarms info when it startup.
But `SnapshotsService` and `ListenerService` are two services,
they can't share the cache data unless they communicate with each other.
This wil be a big change.

Are there any other better solutions? I need some help, thanks :)

BR,
dwj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20161124/31ec372a/attachment.html>


More information about the OpenStack-dev mailing list