From f34d245cba5220c9ad7e46cbae3c796cd115010a Mon Sep 17 00:00:00 2001 From: Ifat Afek Date: Sun, 25 Dec 2016 07:25:16 +0000 Subject: [PATCH] Implement a new datasource to support OPNFV Doctor monitor Implements: blueprint doctor-datasource Change-Id: I57fb0ffa22c7026be7fb6b5f732794b8a3ec163b --- specs/ocata/doctor-datasource.rst | 91 +++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 specs/ocata/doctor-datasource.rst diff --git a/specs/ocata/doctor-datasource.rst b/specs/ocata/doctor-datasource.rst new file mode 100644 index 0000000..42b8d54 --- /dev/null +++ b/specs/ocata/doctor-datasource.rst @@ -0,0 +1,91 @@ +.. + This work is licensed under a Creative Commons Attribution 3.0 Unported + License. + + http://creativecommons.org/licenses/by/3.0/legalcode + +================== +Doctor Data Source +================== + +https://blueprints.launchpad.net/vitrage/+spec/doctor-datasource + +This blueprint describes the datasource that will receive notifications from +OPNFV Doctor monitor + +Problem description +=================== +In order for Vitrage to be accepted as a reference implementation for the +OPNFV Doctor Inspector component, it should be able to receive alarm +notifications from the Doctor monitor. + +Proposed change +=============== +The Doctor datasource will receive notifications in the format defined by +Doctor SB API (see the reference below): + +:: + + { + 'event': { + 'time': '2016-04-12T08:00:00', + 'type': 'compute.host.down', + 'details': { + 'hostname': 'compute-1', + 'source': 'sample_monitor', + 'cause': 'link-down', + 'severity': 'critical', + 'status': 'down', + 'monitor_id': 'monitor-1', + 'monitor_event_id': '123', + } + } + } + + +Upon receiving such a notification, the Doctor datasource will create or +delete a corresponding alarm in Vitrage, based on the 'status' field. + +In addition, a new evaluator template will be added in order to: + - Create deduced alarms on the VMs running on the host + - Modify the states of the host and the VMs to ERROR + - Call Nova force-down API to mark that the host is down + + +REST API impact +--------------- + +The Doctor monitor sends its alarms in REST format. Another blueprint discusses +the SB API that should be added to Vitrage in order to support it. +See https://blueprints.launchpad.net/vitrage/+spec/support-inspector-sb-api + + +Implementation +============== + +Assignee(s) +----------- + +Primary assignee: + ifat-afek + +Work Items +---------- + +- Implement the Doctor datasource +- Write a template for creating deduced alarms on the VMs and calling Nova + mark host down + +Testing +======= + +The changes will be tested by unit tests, and later on also by Doctor test +scripts. + +References +========== + +- https://wiki.opnfv.org/display/doctor/Doctor+Home +- http://artifacts.opnfv.org/doctor/docs/requirements/05-implementation.html + section 4.5.6 +