Page 1 of 1
Not able to monitor Application pool services
Posted: Thu Jul 16, 2020 9:05 am
by deek
Hi ,
I was trying to monitor application pool services of 2008 windows servers . I had gone through a document (
https://exchange.nagios.org/directory/P ... te/details ) and made changes to the nsclient++ file .
I added the vbs script ( Check_IISv7_AppPool_State.vbs ) which was available in the above document to C:\Program Files\NSClient++\scripts and renamed it to check_iis_apppool_state.vbs .
Check command :
check_nrpe
Command view :
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
$ARG1$ :
check_iis_apppool_state
$ARG2$ :
-a "AirWatchAPI"
But when I run check command , I am getting the below error .
Input Error: Can not find script file "C:\Program Files\NSClient++\scripts\check_iis_apppool_state.vbs".
Please look into this and let me know if you need any other requirement .
Re: Not able to monitor Application pool services
Posted: Fri Jul 17, 2020 9:32 am
by ssax
Did you restart the NSClient++ service after adding the plugin?
Please attach your nsclient.ini.
What version of NSClient++ are you running? You can find it listed next to the app name in add/remove programs in the control panel.
Are you seeing anything in your nsclient.log? You may want to enable trace logging:
Code: Select all
; LOG SECTION - Configure log properties.
[/settings/log]
; DATEMASK - The size of the buffer to use when getting messages this affects the speed and maximum size of messages you can recieve.
date format = %Y-%m-%d %H:%M:%S
; LOG LEVEL - Log level to use. Available levels are error,warning,info,debug,trace
level = trace
; FILENAME - The file to write log data to. Set this to none to disable log to file.
file name = ${exe-path}/nsclient.log
Then restart the NSClient++ service, run the check again, and then check the nsclient.log file out and send us any extra info it shows.
One thing I'd also check is if you're not viewing file extensions in windows, enable it so that you can see if it has another extension that what you expect like plugin_name.vbs.txt or something.
Thank you!
Re: Not able to monitor Application pool services
Posted: Wed Jul 22, 2020 9:46 am
by deek
Hi ,
Yes I did restart the nsclient++ service after adding the plugin .
The nsclient version we are using is 0.5.1044
Im attaching nsclient++ file and nsclient.log file .
nsclient.log
nsclient_test.ini
Can you also share any script for application pool service monitoring , so that I can try that also .
Thank you

Re: Not able to monitor Application pool services
Posted: Wed Jul 22, 2020 5:28 pm
by ssax
Edit your nsclient.ini and change this:
Code: Select all
check_iis_apppool_state=cscript.exe //nologo //T:60 scriptscheck_iis_apppool_state.vbs $ARG1$
To this:
Code: Select all
check_iis_apppool_state=cscript.exe //nologo //T:60 scripts\check_iis_apppool_state.vbs $ARG1$
Then restart the NSClient++ service and test again.
I found this one:
https://exchange.nagios.org/directory/P ... ol/details
Re: Not able to monitor Application pool services
Posted: Fri Jul 24, 2020 9:17 am
by deek
Hi ,
I have made the changes to nsclient++ file and restarted it . But still Im getting below error .
[
[email protected] ~]$ /usr/local/nagios/libexec/check_nrpe -H 172.**.**.** -t 30 -c check_iis_apppool_state -a "AirWatchAPI"
C:\Program Files\NSClient++\scripts\check_iis_apppool_state.vbs(25, 1) (null): 0x8004100E[/b]
Im also attaching the screenshot of where the script is placed .
screenshot.PNG
Please let me know if you know any powershell script that we can use .
Thank you .
Re: Not able to monitor Application pool services
Posted: Fri Jul 24, 2020 5:09 pm
by ssax
This one might work for you:
https://exchange.nagios.org/directory/P ... ol/details
Does this command even work from a command prompt on the windows system?
Code: Select all
cscript.exe //nologo //t:60 "\Program Files\NSClient++\scripts\check_iis_apppool_state.vbs " "AirWatchAPI"