[openstack-dev] [congress] generic push driver

Afek, Ifat (Nokia - IL/Kfar Sava) ifat.afek at nokia.com
Tue Jan 9 16:19:02 UTC 2018



From: Eric K <ekcs.openstack at gmail.com>
Date: Tuesday, 9 January 2018 at 0:43

Hi Ifat,

From: "Afek, Ifat (Nokia - IL/Kfar Sava)" <ifat.afek at nokia.com<mailto:ifat.afek at nokia.com>>
Date: Sunday, January 7, 2018 at 4:00 AM


Hi Eric,

I have two questions:


1.      An alarm is usually raised on a resource, and in Vitrage we can send you the details of that resource. Is there a way in Congress for the alarm to reference a resource that exists in another table? And what if the resource does not exist in Congress?
First, the columns I chose are just a minimal sample to illustrate the generic nature of the driver. In use with vitrage, we would probably also want to include columns such as `resource_id`. Does that address the need to reference a resource? That resource referenced by ID may or may not exist in another part of Congress. It would be the job of the policy to resolve references when taking appropriate actions. If referential integrity is needed, additional policy rules can be specified to catch breakage.

[Ifat] Ok, sounds good.

This brings up a related question I had about vitrage:
Looking at the vertex properties listed here: https://github.com/openstack/vitrage/blob/master/vitrage/common/constants.py#L17

Where can I find more information about the type and content of data in each property?

Exapmle:
- is the `resource` property an ID string or a python object reference?

[Ifat] Most of the properties are key-value strings on the vertex in the entity graph. The RESOURCE is a special property that is added on an alarm for the use of the notifier. It holds the entire resource object, so the notifier could use its properties when sending notifications.

- what does the property `is_real_vitrage_id`
represent?

[Ifat] It represents old code that should be deleted ;-) please ignore it

- what is the difference between `resource_id` and `vitrage_resource_id` ?

[Ifat] resource_id is the id of the resource as retrieved by the datasource, e.g. the Nova instance id
         vitrage_id is the id of the resource inside Vitrage. This is the id that Vitrage uses to identify its resources. For a Nova instance, vitrage_id will be different from its resource_id.
         vitrage_resource_id is used only on alarms, and holds the vitrage_id of the resource of the alarm.



2.      Do you plan to support also updateRows? This can be useful for alarm state changes.
Are you thinking about updating an entire row or updating a specific field of a row? That is, update
Row {"id":"1-1", "name":"name1", "state":"active", "severity":1} to become {"id":"1-1", "name":"name1", "state":"active", "severity":100}
Vs
Update the severity field of row with id "1-1" to severity 100.
Both could be supported, but the second one is more complex to support efficiently.

[Ifat] It’s really up to you, I think both would satisfy the use case. The Congress notifier will be written based on your selected implementation.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180109/baac9138/attachment.html>


More information about the OpenStack-dev mailing list