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
105511
Files:
FileDescription
check_iis_site.vbscheck_iis_site.vbs
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
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