congress/congress/datasources
Eric K d10c7db6eb vitrage driver for accepting webhook notifications
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
2018-07-24 18:09:32 -07:00
..
__init__.py Remove unneed __author__ var in __init__ file 2015-02-11 15:30:33 -08:00
aodh_driver.py Enable congress-tempest-plugin to use in congress 2018-01-25 09:17:57 +05:30
benchmark_driver.py Use python3 print, division, import 2016-01-20 15:31:02 -08:00
cfgvalidator_driver.py Unblock gate 2018-06-20 15:22:32 -07:00
cinder_driver.py Unblock gate 2018-06-20 15:22:32 -07:00
cloudfoundryv2_driver.py Remove deepsix reference in datasource drivers 2016-09-01 04:01:57 +00:00
constants.py Use python3 print, division, import 2016-01-20 15:31:02 -08:00
datasource_driver.py Merge "Remove unnecessary ERROR logging" 2018-07-18 19:01:35 +00:00
datasource_utils.py Make tenant_name as optional config option 2018-03-22 14:14:34 +05:30
doctor_driver.py Unblock gate 2018-06-20 15:22:32 -07:00
glancev2_driver.py minor typo fixes 2017-03-08 18:35:13 -08:00
heatv1_driver.py Support lazy tables in openstack drivers 2016-09-01 23:15:21 +00:00
ironic_driver.py Support lazy tables in openstack drivers 2016-09-01 23:15:21 +00:00
keystone_driver.py Fix gate failures 2017-05-08 09:30:18 +05:30
keystonev3_driver.py Add tempest tests for keystonev3 driver 2017-05-22 09:52:50 +05:30
mistral_driver.py Mistral driver 2018-01-24 09:17:56 -08:00
monasca_driver.py Monasca driver poll time type fixed 2018-04-12 00:18:37 +00:00
murano_classes.py Use python3 print, division, import 2016-01-20 15:31:02 -08:00
murano_driver.py Data source driver preserves data types 2018-07-05 00:03:44 +00:00
neutronv2_driver.py Add attach/detach security group action to neutron driver 2018-01-04 21:55:22 +00:00
neutronv2_qos_driver.py Modify grammatical errors 2018-02-08 00:33:02 +08:00
nova_driver.py Unblock gate 2018-06-20 15:22:32 -07:00
plexxi_driver.py Remove deepsix reference in datasource drivers 2016-09-01 04:01:57 +00:00
push_driver.py Distinguish between PUT and PATCH in API models 2018-01-16 16:45:52 -08:00
swift_driver.py Fix swift auth issue by specifying version in url 2018-02-07 11:06:16 -08:00
vCenter_driver.py Remove deepsix reference in datasource drivers 2016-09-01 04:01:57 +00:00
vitrage_driver.py vitrage driver for accepting webhook notifications 2018-07-24 18:09:32 -07:00