How to get remote disk,swap,process status using nagios and nrpe

For Redhat 5.4 or CentOS 5.4

can just add rpmforge repository ..

then do the following to the monitoring host.

yum install nagios-nrpe nagios-nrpe-plugins -y

which pretty much covered in previous post regarding nagios installation.
only need to ammend the file at

 vi /etc/nagios/objects/commands.cfg

to add the following..

 
# 'check_nrpe' command definition
define command{
        command_name check_nrpe
        command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
        }

and for each remote server that you want to monitor.
Need to add some package into it.

yum install nagios-nrpe -y

edit the /etc/nagios/nrpe.cfg

find the line started with allowed_hosts,
append the monitoring server ip accordingly .. so that it can access to the remote host with SSL successfully.

allowed_hosts=192.168.19.31

you can also changed the following code
to suit your need.

# The following examples use hardcoded command arguments...
 
command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/hda1
command[check_logvol00]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /dev/mapper/VolGroup01-LogVol00
command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 450 -c 500
command[check_swap]=/usr/lib64/nagios/plugins/check_swap -w 20 -c 10

then just need to start it.

/etc/init.d/nrpe start
chkconfig nrpe on

then can test.. with something like this
from the monitoring server.

/usr/lib64/check_nrpe -H 192.168.19.203 check_load
 
/usr/lib64/nagios/plugins/check_nrpe -H 192.168.19.216 -c "check_total_procs"

oh well..

that’s pretty much of it.

then can have something like this at the end..

p/s : .. there might more underneath feature that can be added..
let’s see if someone can come up with enough time to play with it.. 😎

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Like

Related Post

7 Responses

  1. Harvey says:

    It is the best time to make some plans for the future and it’s time to be happy. I’ve read this post and if I could I want to suggest you some interesting things or advice. Maybe you can write next articles referring to this article. I desire to read even more things about it!

    Reply
  2. Rachel says:

    Thanks for sharing your info. I really appreciate your efforts and I am waiting for your further write ups thank you once again.

    Reply
  3. Brittney says:

    I do not even know the way I ended up here, however I thought this put up used to be great. I don’t recognize who you might be but certainly you’re going to a well-known blogger in case you are not already. Cheers!

    Reply
  4. website says:

    What’s up, after reading this amazing article i am too delighted to share my knowledge here with colleagues.

    Reply
  5. http://www.ogloszenia-matrymonialne.org.pl says:

    Do you mind if I quote a couple of your articles as long as I provide
    credit and sources back to your site? My blog site is in the very same niche as yours
    and my users would genuinely benefit from some
    of the information you present here. Please let me know if this okay with you.
    Many thanks!

    Reply
  6. calvin klein underwear uk says:

    Incredible! This blog looks just like my old one! It’s on a completely different subject but it has pretty much the same page layout and design. Great choice of colors!

    Reply
  7. calvin klein underwear uk says:

    I really like what you guys are usually up too. Such clever work and coverage!
    Keep up the amazing works guys I’ve included you guys to my own blogroll.

    Reply

Anything to add?

X