blob: 0a28318551fa39a6e69b49f3881ba23d97b851a6 [file] [log] [blame]
Helena McGough375f07c2017-10-13 16:14:16 +01001..
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
22MON Usage Guide
23***************
24This is a guide on how to use the MON module and its three plugins.
25
26The MON module sends requests to an from the SO via an Apache Kafka message
27bus. Currently each message is sent on the message bus in json format, along
28with a unique request key and its topic.
29
30The topics that the plugins will consume messages based on are:
31
32* alarm_request
33* metric_request
34
35In return the plugins will send messages back to the SO with the following
36topics:
37
38* alarm_response
39* metric_response
40
41Each 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
53Sending Messages
54----------------
55For each of the request message that can be sent there is a json schema defined
56in the models directory of the MON repo:
57: `</MON/core/models/>`
58
59To send a valid message to the MON module for use by one of the plugins, your
60message must match the json schema for that request type.
61
62Once you have created a valid json object with your message you can send it on
63the message bus with the required topic and key.
64
65To ensure that the correct plugin uses your message you must also specify the
66vim_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
88A KafkaProducer is used to send the message and it will be consumed by a
89KafkaConsumer 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.