Include documentation and updates for MON manual installation.
[osm/MON.git] / doc / MON_usage_guide.rst
1 ..
2        # Copyright 2017 Intel Research and Development Ireland Limited
3        # *************************************************************
4        # This file is part of OSM Monitoring module
5        # All Rights Reserved to Intel Corporation
6        #
7        # Licensed under the Apache License, Version 2.0 (the "License"); you
8        # may not use this file except in compliance with the License. You may
9        # obtain a copy of the License at
10        #
11        #         http://www.apache.org/licenses/LICENSE-2.0
12        #
13        # Unless required by applicable law or agreed to in writing, software
14        # distributed under the License is distributed on an "AS IS" BASIS,
15        # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16        # implied. See the License for the specific language governing
17        # permissions and limitations under the License.
18        #
19        # For those usages not covered by the Apache License, Version 2.0 please
20        # contact: helena.mcgough@intel.com or adrian.hoban@intel.com
21
22 MON Usage Guide
23 ***************
24 This is a guide on how to use the MON module and its three plugins.
25
26 The MON module sends requests to an from the SO via an Apache Kafka message
27 bus. Currently each message is sent on the message bus in json format, along
28 with a unique request key and its topic.
29
30 The topics that the plugins will consume messages based on are:
31
32 * alarm_request
33 * metric_request
34
35 In return the plugins will send messages back to the SO with the following
36 topics:
37
38 * alarm_response
39 * metric_response
40
41 Each type of request has it's own unique key:
42 * create_alarm_request
43 * create_metric_request
44 * list_alarm_request
45 * list_metric_request
46 * delete_alarm_request
47 * delete_metric_request
48 * update_alarm_request
49 * update_metric_request
50 * acknowledge_alarm_request
51 * read_metric_data_request
52
53 Sending Messages
54 ----------------
55 For each of the request message that can be sent there is a json schema defined
56 in the models directory of the MON repo:
57 : `</MON/core/models/>`
58
59 To send a valid message to the MON module for use by one of the plugins, your
60 message must match the json schema for that request type.
61
62 Once you have created a valid json object with your message you can send it on
63 the message bus with the required topic and key.
64
65 To ensure that the correct plugin uses your message you must also specify the
66 vim_type correctly:
67
68     +----------------------+----------------------+
69     |       Plugin         |      vim_type        |
70     +----------------------+----------------------+
71     | CloudWatch           | cloudwatch           |
72     |                      |                      |
73     | OpenStack            | openstack            |
74     |                      |                      |
75     | vROPs                | vrops                |
76     +----------------------+----------------------+
77
78
79 * Example
80   A create alarm request for the vROPs plugin would be sent with the following
81   information:
82
83     - topic: alarm_request
84     - create_alarm_request
85     - message: a valid message that matches the json schema, with the vim_type
86       specified as vrops
87
88 A KafkaProducer is used to send the message and it will be consumed by a
89 KafkaConsumer which is running for each plugin
90
91
92   .. note::
93
94         The SO support for sending and receiving messages is currently not
95         supported. Support will be added in a later release.