IIS sites monitoring
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: IIS sites monitoring
What version of NSClient are you using?
Also, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the Download Profile (not Show Profile) button in the top right corner. If for whatever reason you cannot download the profile, please put the output of Show Profile in the thread (that will at least get us some info).
After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
Also, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the Download Profile (not Show Profile) button in the top right corner. If for whatever reason you cannot download the profile, please put the output of Show Profile in the thread (that will at least get us some info).
After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
Re: IIS sites monitoring
Thanks
I am using the most latest nsclient version, 0.5.0.62
Moreover profile is attached for further review.
Thanks
I am using the most latest nsclient version, 0.5.0.62
Moreover profile is attached for further review.
Thanks
Last edited by dwhitfield on Fri Dec 09, 2016 10:11 am, edited 1 time in total.
Reason: removing profile for security purposes
Reason: removing profile for security purposes
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: IIS sites monitoring
Could you clarify this a bit? Are you saying you don't want to run NRPE or that NRPE works, but doesn't do what you want it to do?Naveed wrote:All my windows services are monitoring fine with nrpe on it.
Can someone suggest the way to monitor these services?
Also, you posted a screenshot of the services you want to monitor. Are those literally the only services you want to monitor...or at least a complete list of the ones you have left to monitor? Thanks!
Re: IIS sites monitoring
Yes please.
I am using NRPE which is working fine to monitor all my services.
I have added another script to monitor iis sites pool, modifications are made in nsclient.ini file and script is placed in nsclient\scripts directory as well.
My command on nagios server is as follows:
check_nrpe!check_iis_apppool_state!-a '-CheckType AppPool RealTimeService'!!!!!!
I am trying to check the state of RealTimeService pool, whether it is running or stopped.
But after all suggestions on this thread, I am getting service time checkout after 30 seconds error message.
Do let me know if need further clarification on it?
Thanks
I am using NRPE which is working fine to monitor all my services.
I have added another script to monitor iis sites pool, modifications are made in nsclient.ini file and script is placed in nsclient\scripts directory as well.
My command on nagios server is as follows:
check_nrpe!check_iis_apppool_state!-a '-CheckType AppPool RealTimeService'!!!!!!
I am trying to check the state of RealTimeService pool, whether it is running or stopped.
But after all suggestions on this thread, I am getting service time checkout after 30 seconds error message.
Do let me know if need further clarification on it?
Thanks
Re: IIS sites monitoring
Couple of things you can try, run the script from the IIS server and see how long it takes to run, it if is around 30 seconds, then add -t 59 to the check_nrpe command on the Nagios server it increase the timeout.
If this doesn't work, can you post the nsclient.ini and the nsclient.log file from the IIS server.
If this doesn't work, can you post the nsclient.ini and the nsclient.log file from the IIS server.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: IIS sites monitoring
script does not work for us on iis server..
I have attached output, nsclient.ini and log files for further analysis.
Thanks
I have attached output, nsclient.ini and log files for further analysis.
Thanks
You do not have the required permissions to view the files attached to this post.
Re: IIS sites monitoring
It looks like the command is defined incorrectly in the nsclient.ini file and that is causing the timeout.
Try editing your command in the nsclient.ini file and change it from
to
Save the nsclient.ini file and restart the nsclient++ service on the windows host and see if the check passes on the Nagios server.
Try editing your command in the nsclient.ini file and change it from
Code: Select all
check_iis_apppool_state=wscript.exe //nologo //T:60 "C:\Program Files\NSClient++\scripts\\check_iis.ps1" $ARG1$Code: Select all
check_iis_apppool_state= cmd /c echo \scripts\check_iis.ps1 $ARG1$; exit $LastExitCode | powershell.exe -ExecutionPolicy Bypass -command -Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: IIS sites monitoring
Thank you for help
Suggested change is made but did not get desired results yet.
log files entries are:
2016-12-14 23:05:34: error:c:\source\nscp\modules\CheckExternalScripts\CheckExternalScripts.cpp:396: Failed to find wrapping for type: exe
2016-12-14 23:09:28: error:c:\source\nscp\modules\CheckExternalScripts\CheckExternalScripts.cpp:396: Failed to find wrapping for type: exe
Suggested change is made but did not get desired results yet.
log files entries are:
2016-12-14 23:05:34: error:c:\source\nscp\modules\CheckExternalScripts\CheckExternalScripts.cpp:396: Failed to find wrapping for type: exe
2016-12-14 23:09:28: error:c:\source\nscp\modules\CheckExternalScripts\CheckExternalScripts.cpp:396: Failed to find wrapping for type: exe
You do not have the required permissions to view the files attached to this post.
Re: IIS sites monitoring
Command in nslient.ini
check_iis= cmd /c echo scripts\check_iis.ps1 $ARG1$; exit $LastExitCode | powershell.exe -ExecutionPolicy Bypass -command -
Command in nagios:
$USER1$/check_nrpe -H $ARG1$ -t 30 -c $ARG2$ -a '-CheckType $ARG3$'
ARG1=IP address of server
ARG2=check_iis (Check command)
ARG3= Sites/AppPool
URL for above command:
https://exchange.nagios.org/directory/P ... ol/details
Error message is attached for further analysis.
check_iis= cmd /c echo scripts\check_iis.ps1 $ARG1$; exit $LastExitCode | powershell.exe -ExecutionPolicy Bypass -command -
Command in nagios:
$USER1$/check_nrpe -H $ARG1$ -t 30 -c $ARG2$ -a '-CheckType $ARG3$'
ARG1=IP address of server
ARG2=check_iis (Check command)
ARG3= Sites/AppPool
URL for above command:
https://exchange.nagios.org/directory/P ... ol/details
Error message is attached for further analysis.
You do not have the required permissions to view the files attached to this post.
Re: IIS sites monitoring
I don't think your $ARG3$ is proper, the best place would be to test over the command line though. See below -
Code: Select all
So this command also work:
./check_nrpe -H IIS_IP_Address -t 30 -c check_iis -a 'Sites 0 sites01,oldsite'
This command mean:
check 1: iis sites 2: no debug, 3: exclude sites01,oldsite
Former Nagios Employee