vitrage/doc/source/nagios-config.rst
Ifat Afek ca7f4236f5 fixed configuration documentation
Change-Id: Ifd9de428747a72074c235b3c402f847296d82aa4
2016-03-22 16:00:41 +00:00

3.2 KiB

Nagios Plugin Configuration

Configure Access to Nagios

The following should be set in /etc/vitrage/vitrage.conf, under [nagios] section:

Name Description Default Value
user Nagios user
password Nagios password
url Nagios url for querying the data
config_file Nagios configuration file /etc/vitrage/nagios_conf.yaml
changes_interval Interval of checking changes in the configuration files 30 seconds

Example

user = nagios

password = nagios

url = http://10.20.30.40/monitoring/nagios/cgi-bin/status.cgi

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: <Host as appears in Nagios>
   type: <resource type in Vitrage>
   name: <resource name in Vitrage>

 - nagios_host: <Host as appears in Nagios>
   type: <resource type in Vitrage>
   name: <resource name in Vitrage>

 ...

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}