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.