- Just save Check_IISv7_AppPool_State.vbs file into scripts directory
- modify setting in nsclient.ini file as stays below
- restart nsclient service finally
; [/modules] ; NRPE server - A simple server that listens for incoming NRPE connection and handles them. NRPEServer = 1 [/settings/NRPE/server] allowed hosts = YOUR.NAGIOS.SERVER.ADDRESS allow arguments = true allow nasty characters = true port = 5666 timeout = 60 use ssl = 1 performance data = 1 [/settings/external scripts] allow arguments = 1 allow nasty characters = 1 timeout = 60 [/settings/external scripts/scripts] check_iis_defaultapppool=cscript.exe //nologo //T:60 scripts/Check_IISv7_AppPool_State.vbs DefaultAppPool check_iis_mypool=cscript.exe //nologo //T:60 scripts/Check_IISv7_AppPool_State.vbs "My New Pool" check_iis_longrunning=cscript.exe //nologo //T:60 scripts/check_IISv7_long_running.vbs 1000 20000NOTE: Application Pool name with spaces must be quoted as was described in the previous post!
To check settings from nagios server please execute on remotes host
# /usr/local/nagios/libexec/check_nrpe -H IIS.HOST.IP.ADDRESS -t 60 -p 5666 -c check_iis_mypool
If all settings are correct you should see result
OK! My New Pool: STARTED
Enjoy!
No comments:
Post a Comment