Showing posts with label Nagios. Show all posts
Showing posts with label Nagios. Show all posts

Tuesday, February 22, 2011

Installing check_mk for Nagios on CentOS 5.x

check_mk is a wonderful "a new general purpose Nagios-plugin for retrieving data". But this wonder plugins is a good replacement for NRPE, NSClients++ etc. I've tried using check_mk in place of NSClient++ to monitor my Windows Machines successfully


Installing Nagios is straightforward. You may want to see Blog Entry Using Nagios 2.x/3.x on CentOS. In a nutshell, do this in sequence to avoid dependency issues
# yum install nagios nagios-devel

# yum install nagios-plugins-all

Downloading and unpacking check_mk
# wget http://mathias-kettner.de/download/check_mk-1.1.8.tar.gz

# tar -zxvf check_mk-1.1.8.tar.gz

# cd check_mk-1.1.8

# ./setup.sh --yes

Restart the Service
# service nagios restart
# service apache restart

Making the agent accessible through xinetd
# cp -p /usr/share/check_mk/agents/check_mk_agent.linux /usr/bin/check_mk_agent
# cp -p /usr/share/check_mk/agents/xinetd.conf /etc/xinetd.d/check_mk

Restart xinetd service.
# service xinetd restart

Tuesday, July 20, 2010

Encountering CHECK_NRPE: Error - Could not complete SSL handshake ...

My Linux Platform is CentOS 5.x.

When you encounter CHECK_NRPE: Error - Could not complete SSL handshake ... If you encounter this error when using the nagios check_nrpe plugin and the monitored server, it could be due to the following issues.
  1. You will have only an SSL problem if the SSL version used by the check_nrpe and the NRPE daemon are incompatible
  2. Access permission for nrpe.cfg on the monitored server is blocking access. It should have read access rw_r__r__
  3. Permission error within the  /etc/nagios/nrpe.cfg file.
    allowed_hosts=127.0.0.1,192.168.x.x
  4. You will also receive the error if the Nagios Server cannot access the NRPE serice at all through the xinetd.d service. Check the /etc/xinetd.d/nrpe service

    {
    ....
    user = nagios
    group = nagios
    server = /usr/sbin/nrpe
    server_args = -c /etc/nagios/nrpe.cfg --inetd
    log_on_failure += USERID
    disable = no
    only_from = 127.0.0.1,192.168.x.x
    }
  5. If all else fail, check the /var/log/messages
    # grep nrpe /var/log/messages
Once successful, if you do a ./check_nrpe
# cd /usr/lib64/nagios/plugins
# ./check_nrpe -H monitored_server, 
NRPE v2.12

Sunday, July 18, 2010

Installing and checking /proc/mount using Nagios Plugins on CentOS 5.x

This Plugin is very useful to capture all the values of /proc/mount and display in % free. And all can be display with a single command plugin-in. For more information, take a look at Installing and checking /proc/mount using Nagios Plugins on CentOS 5

Saturday, July 17, 2010

Incorporating PNP 0.4.x (PNP is not Perfparse) with Nagios 3 and CentOS 5

This Blog Entry is on Incorporating PNP 0.4.x (PNP is not Perfparse) with Nagios 3 and CentOS 5. PNP.

PNP4Nagios (English) is an addon to nagios which analyzes performance data provided by plugins and stores them automatically into RRD-databases.

For more information, read on Incorporating PNP 0.4.x (PNP is not Perfparse) with Nagios 3 and CentOS 5 on Linux Cluster

Thursday, July 15, 2010

Installing Check Disk IO Plugins via NRPE on CentOS 5.x

This Blog Entry is on installing Check Disk IO Plugins for Nagios 3.x. You can learn how to monitor Disk I/O on your remote Server. For more information go to Installing Check Disk IO Plugins via NRPE on CentOS 5.x at Linux Cluster

Issues when installing NagVis to Nagios on CentOS 5.x

Installing Nagvis on Nagios 3.x is quite a challenge on CentOS 5.x. Still in the process of doing it. But I thought I record some of the notes during installation of Nagvis prerequisties.

Before you install the Nagvis prerequisties, do install the following:

1. Install mySQL database
# yum install mysql mysql-devel mysql-server gcc-c++

2. Install PHP and required PHP modules
# yum install php* php-gd php php-mbstring php-mysql

It is useful to install NDOutils as Nagios' NDOutils store all configuration and event data from Nagios into a database, which will help facilidate quicker retrieval and processing event data. Lots of other Nagios-related tools (e.g. NagVis rely on the MySQL backend made available by NDOUtils. Do refer to this excellent article NDOutils on CentOS


3. Compiling Nagvis on CentOS 5.x
Finally, here the unfinished portion, first go to Nagvis Download site
Untar the Nagvis package and install
# tar -zxvf nagvis-1.5.1.tar.gz
# cd nagvis-1.5.1
# ./install.sh -B /usr/bin/nagios

You want to take a look at Install and Configure NagVis although the instruction is for Debian Derivative

Sunday, March 7, 2010

Directory index forbidden by Options directive error for when displaying nagios

When you are unable to display the Nagios web after installation but encounter "Directory index forbidden by Options directive: .........." error. You need to set Apache to serve the file when the directory is requested.

To resolve the problem above. Go to
# vim /etc/httpd/conf/httpd.conf

Type the following into http.conf and restart apache and nagios


# service htpd restart
# service nagios restart

Tuesday, August 4, 2009

Return Code Error of 127 for Nagios

If launching the nagios web interface, you encountered error like "Return code of 127 for check of service 'HTTP' on host 'localhost' was out of bounds. Make sure the plugin you're trying to run actually exists."

From the error itself, your installation of nagios-plugins has issues. To resolve the problems, make sure you install

# yum install nagios-plugins-all
(You should see 55+ plugin packages being installed)

For other readings on Nagios, see

  1. How to resolve unpingable host down status in Nagios
  2. Notes to remembers when Installing Nagios 3.x on CentOS 5
  3. Using Nagios 2.x/3.x on CentOS