Saturday, February 6, 2010

More Nagios service definitions for windows

Monitor disks with NSClient
define command {
command_name check_nrpe_DriveSpace
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckDriveSize -a MinWarn=$ARG1$ MinCrit=$ARG3$ CheckAll $ARG3$
# ARG3 : FilterType=FIXED FilterType=REMOTE
}

define service{
use generic-service
host_name myhost
service_description Disk space
#Warning,Critical,Filter
check_command check_nrpe_DriveSpace!15%!10%!FilterType=FIXED
high_flap_threshold 35.0
low_flap_threshold 30.0
notification_options w,u,c,r,f
}

Check all fixed disks NSClient command line:
CheckDriveSize MinWarn=15% MinCrit=10% CheckAll FilterType=FIXED
Nagios command line:
sudo /usr/local/nagios/libexec/check_nrpe -H 192.168.100 -c CheckDriveSize -a MinWarn=50% MinCrit=25% CheckAll FilterType=FIXED

Montor services with NSClient

nsclient commandline:
CheckServiceState CheckAll exclude=wampmysqld exclude=ccmsetup exclude=tcsd_win32.exe

define command {
command_name check_nrpe_AutoStartedServices
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c CheckServiceState -a CheckAll $ARG1$
# ARG1 : exclude=ccmsetup exclude=test
}

define service{
use generic-service
host_name SELANSFVD99
service_description Autostarted Services
# ARG1 : exclude=ccmsetup exclude=test
check_command check_nrpe_AutoStartedServices!exclude=SysmonLog
high_flap_threshold 35.0
low_flap_threshold 30.0
notification_options w,u,c,r,f
}

No comments:

Post a Comment