Accepts POST webhook notifications [1] at
/v1/data-sources/<data-source-name>/webhook
On alarm activate notification from Vitrage, a new alarm row [2]
is created in Congress vitrage data source service.
On alarm deactivate notification from Vitrage, the corresponding
alarm row is deleted in Congress vitrage data source service.
A retry policy on the sender side would be helpful to avoid
notifications being lost to transient issues
(example from zaqar [3]).
Nonetheless, it is still possible that an alarm deactivate
notification is missed, and an alarm row remains in Congress
indefinitely.
To clean-up these rows, the optional config
'hours_to_keep_alarm' sets the approximate number of hours
before an active alarm row is deleted from Congress.
[1] Expected payload format:
{
"notification": "vitrage.alarm.activate",
"payload": {
"vitrage_id": "2def31e9-6d9f-4c16-b007-893caa806cd4",
"resource": {
"vitrage_id": "437f1f4c-ccce-40a4-ac62-1c2f1fd9f6ac",
"name": "app-1-server-1-jz6qvznkmnif",
"update_timestamp": "2018-01-22 10:00:34.327142+00:00",
"vitrage_category": "RESOURCE",
"vitrage_operational_state": "OK",
"vitrage_type": "nova.instance",
"project_id": "8f007e5ba0944e84baa6f2a4f2b5d03a",
"id": "9b7d93b9-94ec-41e1-9cec-f28d4f8d702c"
},
"update_timestamp": "2018-01-22T10:00:34Z",
"vitrage_category": "ALARM",
"state": "Active",
"vitrage_type": "vitrage",
"vitrage_operational_severity": "WARNING",
"name": "Instance memory performance degraded"
}
}
https://docs.openstack.org/vitrage/latest/contributor/notifier-webhook-plugin.html
[2] alarms table schema:
'name'
'state'
'type'
'operational_severity',
'vitrage_id'
'update_timestamp'
'receive_timestamp'
'resource_name'
'resource_id'
'resource_vitrage_id'
'resource_project_id'
'resource_operational_state'
'resource_type'
[3] https://docs.openstack.org/zaqar/pike/user/notification_delivery_policy.html
Change-Id: I1943cb81eadb1abba9e62d3d886778a09ec63118