From fd29a78776c10858968796f284470cd287a8bb1e Mon Sep 17 00:00:00 2001 From: Ifat Afek Date: Tue, 23 Feb 2016 09:54:47 +0000 Subject: [PATCH] documented nagios configuration Change-Id: I54369730fd22213d0041a93725df3982a5299979 --- doc/source/nagios-config.rst | 92 ++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 doc/source/nagios-config.rst diff --git a/doc/source/nagios-config.rst b/doc/source/nagios-config.rst new file mode 100644 index 000000000..f1f87748a --- /dev/null +++ b/doc/source/nagios-config.rst @@ -0,0 +1,92 @@ +=========================== +Nagios Plugin Configuration +=========================== + +Configure Access to Nagios +-------------------------- + +The following should be set in **/etc/vitrage/vitrage.conf**, under synchronizer_plugins section: + ++----------------------+------------------------------------+--------------------------------+ +| Name | Description | Default Value | ++======================+====================================+================================+ +| nagios_user | Nagios user | | ++----------------------+------------------------------------+--------------------------------+ +| nagios_password | Nagios password | | ++----------------------+------------------------------------+--------------------------------+ +| nagios_url | Nagios url for querying the data | | ++----------------------+------------------------------------+--------------------------------+ +| nagios_config_file | Nagios configuration file | /etc/vitrage/nagios_conf.yaml | ++----------------------+------------------------------------+--------------------------------+ + +**Example** + +nagios_user = nagios + +nagios_password = nagios + +nagios_url = http://10.20.30.40/monitoring/nagios/cgi-bin/status.cgi + +nagios_config_file = /etc/vitrage/nagios_conf.yaml + + +Configure Nagios Host Mapping +----------------------------- + +Nagios tests are defined in a table with columns: Host, Service, Status, Last Check, etc. + +Nagios "Host" is not necessarily a resource of type host. It can also be an instance, switch, or other resource types. **nagios_conf.yaml** is used to map Nagios host type to a Vitrage resource. + +**Format** +:: + + nagios: + - nagios_host: + type: + name: + + - nagios_host: + type: + name: + + ... + + +**Example** + +The following file will map compute-1 to a nova.host named compute-1; and compute-2 to a nova.host named host2 + +:: + + nagios: + - nagios_host: compute-1 + type: nova.host + name: compute-1 + + - nagios_host: compute-2 + type: nova.host + name: host2 + + + +**Default Configuration** + +A default nagios_conf.yaml will be installed with Vitrage. Its content is still TBD, but it will be similar to the following example. + +All Nagios hosts named host* or * -devstack will be mapped in Vitrage to resoruces of type nova.host with the same name; and all Nagios hosts named instance* will be mapped to nova.instance resources. + +:: + + nagios: + - nagios_host: host-(.*) + type: nova.host + name: ${nagios_host} + + - nagios_host: (.*)-devstack + type: nova.host + name: ${nagios_host} + + - nagios_host: instance-(.*) + type: nova.instance + name: ${nagios_host} +