Check_Disk issue

My goal is to monitor a certain partition (/var) on a remote server, specifically the “/log” folder. Then, once the partition fills to over 50%, I want it to spit out an email to the notify group and a page.

The Nagios server is running openSUSE 10.3 x64 and was installed via RPM.
Nagios v2.9
Nagios-Plugins v1.4.9
Nagios-Plugins-Extras v1.4.9
Nagios-WWW v2.9

The Problem:
After running a df on the nagios box and the remote host, it seems as though it is getting the readings locally and not off the remote server. I am confused as to how to set up Nagios and the plugin so it can read the data off the remote server.

I added/edited the following config files (in /etc/nagios):

checkcommands.cfg

‘check_disk’ command definition

define command{
command_name check_disk
command_line $USER1$/check_disk -w 50% -c 75% -p /var/log -C
}

nrpe.cfg
command[check_disk]=/usr/lib/nagios/plugins/check_disk -w 50% -c 75% -p /var/log

services.cfg

Service definition

define service{
use generic-service ; Name of service template to use

host_name				remoteserver
service_description		Check Disk
is_volatile			0
check_period			24x7
max_check_attempts		3
normal_check_interval		5
retry_check_interval		1
contact_groups			chlinux-admins
notification_interval		120
notification_period		24x7
notification_options		c,r
check_command			check_local_disk!50%!75%!"/var/log"
}

I’ve done a ton of research last week and got this far. I was wondering if anyone could at least steer me in the right direction. Thank you in advance.

Hi,
yes the check you have in checkcommands.cfg is local indeed, you should have something like:

command_line $USER1$/check_nrpe -H $HOST$ -c check_disk

(check the parameters)

The rest looks quite correct to me.
Bye
Ivan

Thank you very much for your support!

I am getting this error when I run it on the Nagios server:
servernamei:~ # /usr/lib/nagios/plugins/check_disk $USER1$/check_nrpe -H $servername$ -c check_disk
DISK CRITICAL - $/check_nrpe does not exist

Is there something I have to do on the remote server end? Thank you

Haven’t had much help as of yet. Help would be appreciated. Thank you.

It’s

servernamei:~ # /usr/lib/nagios/plugins/check_nrpe -H <hostname> -c check_disk

not

servernamei:~ # /usr/lib/nagios/plugins/check_disk $USER1$/check_nrpe -H $servername$ -c check_disk

HTH

/S

So, I need to check_nrpe plugin and I need to install the NRPE Nagios Addon on the remote server, correct?

Where can I find the check_nrpe plugin? It was not in the nagios-plugins RPM or the tarball.

Thank you!

The documentation at nagios.sourceforge.net/docs/nrpe/NRPE.pdf will explain it all in greater detail than I can possibly go into

HTH

/S

Thank you very much, I didn’t notice there was a PDF for nrpe or I probably wouldn’t be so lost! Good find :slight_smile: