From 36a248ca49149b81893b2c1790799081c6ace977 Mon Sep 17 00:00:00 2001 From: Elisha Rosensweig Date: Tue, 29 Mar 2016 18:10:36 +0300 Subject: [PATCH] nagios configuration guide Change-Id: I258601184f8fde1a2b328a03ffc1db9319542b75 --- doc/source/nagios-config.rst | 18 +++-- doc/source/nagios-devstack-installation.rst | 78 +++++++++++++++++++++ 2 files changed, 89 insertions(+), 7 deletions(-) create mode 100644 doc/source/nagios-devstack-installation.rst diff --git a/doc/source/nagios-config.rst b/doc/source/nagios-config.rst index 71aad701d..e411e2817 100644 --- a/doc/source/nagios-config.rst +++ b/doc/source/nagios-config.rst @@ -21,16 +21,20 @@ The following should be set in **/etc/vitrage/vitrage.conf**, under [nagios] sec | changes_interval | Interval of checking changes in the configuration files | 30 seconds | +------------------+---------------------------------------------------------+-------------------------------+ +**Note:** To avoid issues with paging, it is recommended for the URL to be of +the form *http:///cgi-bin/status.cgi*, which returns all the +nagios tests. + **Example** -user = nagios - -password = nagios - -url = http://10.20.30.40/monitoring/nagios/cgi-bin/status.cgi - -config_file = /etc/vitrage/nagios_conf.yaml + :: + [nagios] + user = omdadmin + password = omd + url = http://10.20.30.40/monitoring/nagios/cgi-bin/status.cgi + config_file = /etc/vitrage/nagios_conf.yaml + Configure Nagios Host Mapping ----------------------------- diff --git a/doc/source/nagios-devstack-installation.rst b/doc/source/nagios-devstack-installation.rst new file mode 100644 index 000000000..e9aae494b --- /dev/null +++ b/doc/source/nagios-devstack-installation.rst @@ -0,0 +1,78 @@ +Nagios-for-Devstack Configuration Guide +======================================= + +Overview +-------- + +This page describes how to manually install and configure Nagios on devstack. +After following the steps described here, Nagios will be installed via the OMD +package (http://omdistro.org/) and will have a basic set of tests for +monitoring the Devstack VM. It will then be possible to sync Nagios into +Vitrage. + +The following guide is for Ubuntu. With slight modifications should work for +other linux flavours. Links for this purpose are added below. + +Installation +------------ + +1. Update your repo to include the OMD key: + :: + + wget -q "https://labs.consol.de/repo/stable/RPM-GPG-KEY" -O - | sudo apt-key add - + +2. Update your repo with the OMD site. For example, for wheezy release: + :: + + sudo bash -c "echo 'deb http://labs.consol.de/repo/stable/ubuntu trusty main' >> /etc/apt/sources.list" + sudo apt-get update + + For additional distros, see https://labs.consol.de/repo/stable/ + +3. Install OMD + :: + + sudo apt-get install omd + +4. Create a site for nagios with a name of your choosing, for example "my_host". + :: + + sudo omd create my_host + sudo omd config my_host set APACHE_TCP_PORT 54321 + sudo omd config my_host set APACHE_TCP_ADDR 0.0.0.0 + sudo omd start my_host + + You can now access your Nagios site here: *http://:54321/my_host/omd*. + :: + + username: omdadmin + password: omd + + *Notes:* + - The default port is OMD uses is 5000, which is also used by OpenStack + Keystone, and so it must be changed. Port 54321 used here is only an + example. + - APACHE_TCP_ADDR indicates the address to listen on. Use 0.0.0.0 to listen + for all traffic addressed to the specified port. Use a different address + to listen on a specific (public) address. + +5. Install the Check_MK client on devstack VM: + :: + + sudo apt-get install check-mk-agent + +6. Activate the agent, by editing */etc/xinetd.d/check_mk* and setting + "disable" to "no", and then run + :: + + sudo service xinetd restart + +7. In your browser, go to *http://:/my_host/omd* + and follow the instructions at this link_ to configure the nagios host. + + .. _link: http://mathias-kettner.de/checkmk_install_with_omd.html#H1:Configuring_the_first_host_and_checks + +8. *Vitrage Support.* With Nagios installed, you can now sync it into Vitrage. + follow the instructions here_. + + .. _here: https://github.com/openstack/vitrage/blob/master/doc/source/nagios-config.rst \ No newline at end of file