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

Login

Remember Me

Directory Tree

check_iis_site

Rating
3 votes
Favoured:
1
Current Version
0.3
Last Release Date
2011-01-25
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
Owner
Hits
105994
Files:
FileDescription
check_iis_site.vbscheck_iis_site.vbs
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
A quick VB script to test the status of an IIS web site.

Usage: cscript //nologo //T:60 check_iis_site.vbs "site comment"
Updates found in v0.3 (released 2011-01-25):

* Better error-trapping, so that the plugin will not return "OK" if IIS is not installed


This can easily be used via NSClient++ (what I use) or some other client that is able to execute custom, local plugins.

My NSC.ini definition:

command[check_iis_site]=cscript.exe //nologo //T:60 scriptscheck_iis_site.vbs "$ARG1$"

My Nagios check command definition:

$USER1$/check_nrpe -H $HOSTADDRESS$ -t 60 -c check_iis_site -a "$ARG1$"


The site comment is the full, case-sensitive comment found in the IIS Manager. It was either that or the numerical IIS "name", and that was a pain.

Out of the box, it will return CRITICAL for the following:

* Stopped
* Paused

It will return WARNING for the following:

* Starting
* Stopping
* Pausing
* Continuing

It will return OK for the following:

* Started

I'm sure this could be improved, but it works for my needs. Patches/suggestions welcome.

Released under two-clause BSD license.

NOTE: If you still have problems with the plugin returning a "Is IIS installed?" error, you may need to enable the IIS 6 WMI compatibility option. This can be found in the sub-options of the Web Server (IIS) role: Right-click on Computer -> Manager -> Roles -> Web Server (IIS) -> Add Role Services -> IIS 6 Management Compatibility.

Reviews (2)
byadarsh, May 19, 2013
Great plugin thanks, now i can monitor my organisation's sites individually.
I'm currently testing this on a iis 6.0 (w2k3 server) and a don't see the "case-sensitive comment" you talk about.

best regards,
NS