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

Weyl, Alexey (Nokia - IL) alexey.weyl at nokia.com
Thu Nov 24 08:25:14 UTC 2016


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] 
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
Cc: 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



More information about the OpenStack-dev mailing list