IIS

Check IIS 7 Application Pool State

Description:

This plugin check the state of an Application Pool in IIS 7.0 (Windows Server 2008)

Current Version

1.0

Last Release Date

2011-12-02

Compatible With

  • Nagios 2.x
  • Nagios 3.x

License

GPL


Project Files
Project Notes
This plugin is based on "Check IIS Application Pool State" by Vincent Besancon and modified to work for IIS 7.0 on Windows 2008 (R2). Follow directions on Vincent's project about some working setup with Nagios.
Reviews (10) Add a Review
Hide the cscript header
by djinlemage, March 31, 2018

Thank you, really helpful. To hide the header, add // NoLogo to [/ settings / external scripts / wrapped scripts] check_iis_apppool_state = cscript.exe scripts check_iis_apppool_state.vbs $ ARG1 $ -->check_iis_apppool_state=cscript.exe //NoLogo scriptscheck_iis_apppool_state.vbs $ARG1$



This Is Huge For Us!
by transom324, July 31, 2016

We have an EMR with 8 IIS application pools any of which may or may not start after a server reboot. This is huge for us! We don't mind the Microsoft (R) Windows Script Host Version in the Status Information field. Thanks.



Windows Server 2012 R2 and IIS 8.5
by CaptainChaos, June 30, 2015

It also works with Windows Server 2012 R2 and IIS 8.5



How can i get rid of the Microsoft message in the header?
by mkandoth, February 28, 2015

"Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved." OK! iMISapp: STARTED



A mini how-to, NagiosXI
by LordInfidel, November 30, 2014

For NagiosXI users, this is what I had to do to get this working. 1. Add the vbs script to C:Program FilesNSClient++scripts I renamed mine to: check_iis_apppool_state.vbs Also assumed you have installed the 64bit version. 2. In your NSCLIENT.ini file, add the following: a. Settings for your external scripts [/settings/external scripts] allow arguments = 1 allow nasty characters = 1 timeout = 90 b. A Wrapped scripts section [/settings/external scripts/wrapped scripts] check_iis_apppool_state=cscript.exe scripts\check_iis_apppool_state.vbs $ARG1$ c. the wrappings section [/settings/external scripts/wrappings] vbs = cscript.exe //T:30 //NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS% exe = cmd /c %SCRIPT% %ARGS% * You don't need to create an alias. The way this works is that nagios will use npre to call check_iis_apppool_state, which in turn will call csript, which since it's an exe will require the exe wrapper. And since your calling a vbs, you need the vbs wrapper. 3. In Nagios, create a new command. For those of you who have not created commands before, This is done in Core Config. I called my command: check_iis_apppool_state The important part of the command is that whatever is after the -c , must match what you put in your ini file. Mine looks like this: $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c check_iis_apppool_state -a "$ARG1$" MAKE SURE YOU QUOTE $ARG1$ or else you will spend hours trying to figure out why it is not working. In other words, copy and paste exactly what it looks like. 4. In Nagios, again in Core Config, create a service that references the command. In $ARG1$, simply put the name of the Application Pool. Go ahead and test the check command, it should work. Save it then apply the configuration. Hint- if you have not created services before, an easy way to do it is to simply copy it from an existing service on the host you are aiming for so you get the correct alert settings. ***SPECIAL NOTE***** If your AppPool name has a space and - , you will have to change the name of the AppPool. I've tried using the old faithful method of quoting along with escaping, but it just does not get passed correctly to NPRE and it will fail. You can have hyphens, just no space hyphen. If you followed my directions and it still does not work, well then you probably did not follow my directions. Go thru the steps and try again (-; Good Luck and May the Force be With you.



WMI
by soccer5232, July 31, 2012

it requires you have installed on the IIS Server, "IIS Management Scripts and Tools"



Thanks for the plugin!
by darryl.madtha, July 31, 2012

but the pool names with spaces cannot be checked. ' for pool names with spaces numargs = WScript.Arguments.Unnamed.length - 1 for i = 1 to numargs 'WScript.Echo(" " + WScript.Arguments.Unnamed.Item(i)) strArgAppPool = strArgAppPool & " " & WScript.Arguments.Unnamed.Item(i) next



Nice !
by bigbrozer, March 31, 2012

Hi, I'm the author of the original plugin. Thanks for this, it is difficult for me to maintain the original one today... good to know that people improve it ;-) But, good news, I will have the opportunity to work on a new one that will use WS Management Protocol. This will support new Windows Server version and avoid the use of a Nagios Agent (NSClient). Keep up the good work !



Thank you! ^_^ working g8!!
by tomerof, March 31, 2012

i was looking for that solution for a long time ^_^ thank you!!



Works well!!
by brianhonaker, January 31, 2012

This does exactly what I need it to. Now if we could find one that works at the site ID level to monitor if the site is stopped or not.



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.5 (15)
Favorites
2
Views
112,152