Installing NRPE daemon


#1

I’ve trying to install NRPE to a host to be monitored. What I’ve done, I’ve tried to install NRPE via yum / rmp to the host client.

I’ve installed Dag’s repo

Then installer NRPE through yum command

So, it went through the install and I’ve configured the NRPE on the /etc/xinetd.d/ and changed the IP address to that of my nagios server.

I had to install xinetd because it was missing on my test client. But, when I tried to edit the nrpe.cfg on the directory where it’s suppose to be - it’s not there. I tried to do a locate for nrpe.cfg, its like it wasn’t installed.

I tried following the instructions on this link http://www.learnacad.com/networking/monitoring/70-how-to-monitor-a-remote-linux-host-using-nagios.html?start=2
but it seems that this link is missing something or either that I’m missing something. I’ve tried looking at other websites but the instructions are pretty much similar.

I could use some help, thanks.

What am I missing


#2

I’d recommend you purge the rpm and install from source.
exchange.nagios.org/directory/Ad … or/details

At least the paths will be correct when you are done.


#3

So, from installing from source instead of using the rpm, I’ll need to install openssl-devel to run and complete the install. Is there another way where I don’t need to install other packages, just install nrpe?

Thanks Luca.


#4

So, I installed NRPE from source while installing xinetd and openssl-devel.

So, when I ran the test from the nagios server

/usr/local/nagios/libexec/check_nrpe -H client IP NRPE v2.12I get a positive response

But, when a run an actual nrpe command to test my client

/usr/local/nagios/libexec/check_nrpe -H "client_ip" -c check_sda1 NRPE: Unable to read outputI get an error message. I know that I’ve got the “rights” correct. But I’m a little stumped as to the error message.

drwxrwxr-x 5 nagios nagios 4096 Jan 21 13:16 nagios drwxrwxr-x 2 nagios nagios 4096 Jan 21 13:14 libexec -rwxrwxr-x 1 nagios nagios 66085 Jan 21 13:14 check_nrpe
After some google search - they pretty much point to having rights.

Any recommendation?


#5

does the check_sda1 script run if you launch it from crontab without being logged in as the nagios user? I’m not sure it can be run locally… but it’s worth a try to see if it’s configured correctly…


#6

Not sure what you meant when you said “does the check_sda1 script run if you launch it from crontab without being logged in as the nagios user”

Sorry for being new to linux - but, how do you run it from a crontab and what is it?

/usr/local/nagios/libexec/check_nrpe -H client2 IP -c check_sda1 DISK OK - free space: /boot 68 MB (72% inode=99%);| /boot=25MB;78;88;0;98 /usr/local/nagios/libexec/check_nrpe -H client2 IP -c check_users USERS OK - 0 users currently logged in |users=0;5;10;0
The command works, cause I get a reply with checking my other test client.