Home Directory Plugins Web Servers IIS Check IIS 7 Application Pool State

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com


Remember Me

Directory Tree

Check IIS 7 Application Pool State

15 votes
Current Version
Last Release Date
Compatible With
  • Nagios 2.x
  • Nagios 3.x
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
This plugin check the state of an Application Pool in IIS 7.0 (Windows Server 2008)
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)
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 scripts\check_iis_apppool_state.vbs $ARG1$
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.
It also works with Windows Server 2012 R2 and IIS 8.5
"Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved."

byLordInfidel, November 6, 2014
1 of 1 people found this review helpful
For NagiosXI users, this is what I had to do to get this working.

1. Add the vbs script to C:\Program Files\NSClient++\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.


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.
bysoccer5232, July 31, 2012
4 of 4 people found this review helpful
it requires you have installed on the IIS Server, "IIS Management Scripts and Tools"
bydarryl.madtha, July 29, 2012
1 of 1 people found this review helpful
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)
bybigbrozer, March 28, 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 !
i was looking for that solution for a long time ^_^ thank you!!
bybrianhonaker, January 18, 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.