Monitoring a Linux Host


#1

Good morning, please forgive me if this has been asked or is a rather silly noob question!

I have been using Nagios to monitor various aspects of Windows clients for a while now without problem and great results. However, I now have a requirement to monitor a linux host. I tried to read the manual but I am getting rather confused; I see it needs something called NRPE which I guess needs to be installed onto the linux host but when I try it tells me I must install Nagios too.

Has anyone got any experience in monitoring a remote (OpenSuse11.0) linux machine?
Oh and the new forum look is SO much better then previously, good work admins :slight_smile:


#2

Hi Guys,
I know there’s been 0 views and 0 replies lol but for those having similar problems, I wanted to write back with an update.
I run suse11.0 on my nagios machine and also on the remote host which I wanted to monitor. Using the YAST package manager I added on the remote machine “nagios-nrpe”.

I then started the service using the defaults in YAST > system settings > Runlevels.
It started no problem.

I then had to modify the CFG file (in my case, this was located in /etc/nagios) and modified the line:-

and entered the IP address of the Nagios machine.
Once this was done, I switched to the Nagios machine and tried some of the default commands:

cd /usr/lib/nagios/plugins ./check_nrpe -H 192.168.1.224 -n -c check_users

This returned an error :frowning:

After research using Google, I found I had to specify the port number (even though it was default) in the check_nrpe command; changed it to:-

It returned the expected result (hoorah). However, I discovered that the other “standard” plugin commands (check_disk and so on) would not work, it kept telling me

./check_nrpe -H 192.168.1.224 -p 5666 -c check_disk NRPE: Command 'check_diskx not defined

After checking the nrpe.cfg file on the remote host, it did not contain such a command.
I did see in the /etc/nagios/command.cfg that check_disk WAS defined. Quite odd. However, a little more poking about in the nrpe.cfg file, I noticed that it does not include this file by default.

Un-commenting and editing the include line in nrpe.cfg to

and trying again, it now provides a reply:

./check_nrpe -H 192.168.1.224 -p 5666 -c check_disk Unknown argument Usage: check_disk -w limit -c limit -W limit] -K limit] {-p path | -x device} -C] -E] -e] -g group ] -k] -l] -M] -m] -R path ] -r path ] -t timeout] -u unit] -v] -X type]

I just need to lob some arguments to it and it should work.
Hoorah for me :slight_smile:


#3

ok, so back to the drawing board!
all that worked through the command line up to the point where I had to throw the variables at it then it started to complain

./check_nrpe -H 192.168.1.224 -p 5666 -c check_disk -a -w 200 -r /home ./check_nrpe: invalid option -- 'r'

I don’t quite get it, I set dont_blame_nrpe to 1 to allow arguments and I didn’t compile from source (so didn’t specify “–enable-command-args” when compiling).

Any ideas?