Check Windows nodes by executing remote scripts
There is more than one way to get there. There is the pNSClient.exe you can use. I used NRPE_NT.exe. On the Windows host this service will be installed. The scripts to get the info from the host that I used are chkwin_cputime.wsf and check_disk.wsf. You can get them from nagiosexchange.org.
This is the config file for the NRPE_NT service on the Windows host:
############################################################################# # Sample NRPE Config File # # NOTES: # This is a sample configuration file for the NRPE_NT service. It needs to be # located on the remote host that is running the NRPE_NT service, not the host # from which the check_nrpe client is being executed. ############################################################################# # PORT NUMBER server_port=5666 # SERVER ADDRESS #server_address=192.168.1.1 # ALLOWED HOST ADDRESSES #allowed_hosts=10.10.9.100,10.10.9.101,192.168.1.100 # COMMAND ARGUMENT PROCESSING dont_blame_nrpe=0 # DEBUGGING OPTION debug=1 # COMMAND TIMEOUT command_timeout=30 # INCLUDE CONFIG FILE #include=<somefile.cfg> # INCLUDE CONFIG DIRECTORY # LOGLEVEL / NRPE_NT only # USE_WIN_METACHARS / NRPE_NT only # RRD: my commands # The values for options c and w indicate the free space that is left # The values for options c and w indicate the cpu utilization maximum thresholds |
Go to the Nagios server and edit the config files:
# vi /etc/nagios/r71_commands.cfg
# ‘check_nrpe’ command defenition to check windows hosts define command { command_name check_nrpe command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -c $ARG1$ } |
# vi /etc/nagios/r71_services.cfg
define service { name check-nrpe-disk-util service_description DISK UTIL use basic-service notification_interval 60 contact_groups r71 notification_options c,w,r notification_period 24×7 check_command check_nrpe!check_disk_c register 0 } define service{ define service { define service{ |
Leave a Reply