WMI Internet Information services (IIS) Profile
This profile monitors IIS services on a Windows server using Windows Management Instrumentation (WMI). Nagios Remote Plugin Executor (NRPE) is used by the Nagios server to communicate with the WMI proxy server. This proxy server queries the monitored Windows server for measurements and status using WMI.
Additionally, you may want to refer to the WMI documentation. This project consists of a collection of script monitors (.vbs for starters) that use the Microsoft .Net Framework and WMI to retrieve performance data from remote Windows hosts without the need for agents on the remote hosts.
Services Configuration
- Service - Definitions in Monarch are stored under this name.
- Command Line - Service command name with arguments to be passed to the plugin.
- Plugin Command Line - Plugin script called by Nagios for this Service.
- Extended Info - The Extended Service Info definition, typically used for generating graphs.
Command lines displayed below are intended to be single line commands. Service Command Line Plugin Command Line Extended Info wmi_iis_bytes_received check_wmi_iis_bytes_received!
Name=_Total!6000!12000$USER1$/check_nrpe -t 60 -H $USER21$ -c get_iis_bytes_received -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$" number_graph wmi_iis_bytes_sent check_wmi_iis_bytes_sent!
Name=_Total!6000000!10000000$USER1$/check_nrpe -t 60 -H $USER21$ -c get_iis_bytes_sent -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$" number_graph wmi_iis_bytes_total check_wmi_iis_bytes_total!
Name=_Total!500000!600000$USER1$/check_nrpe -t 60 -H $USER21$ -c get_iis_bytes_total -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$" number_graph wmi_iis_current_connections check_wmi_iis_current_connections!
Name=_Total!200!400$USER1$/check_nrpe -t 60 -H $USER21$ -c get_iis_currentconnections -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$" number_graph wmi_iis_current_nonanonymous_users check_wmi_iis_current_nonanonymous_users!
Name=_Total!50!80$USER1$/check_nrpe -t 60 -H $USER21$ -c get_iis_curnonanonusers -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$" number_graph wmi_iis_get_requests check_wmi_iis_get_requests!
Name=_Total!200!400$USER1$/check_nrpe -t 60 -H $USER21$ -c get_iis_get_requests -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$" number_graph wmi_iis_maximum_connections check_wmi_iis_maximum_connections!
Name=_Total!50!60$USER1$/check_nrpe -t 60 -H $USER21$ -c get_iis_maximumconnections -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$" number_graph wmi_iis_post_requests check_wmi_iis_post_requests!
Name=_Total!200!400$USER1$/check_nrpe -t 60 -H $USER21$ -c get_iis_post_requests -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$" number_graph wmi_iis_private_bytes check_wmi_iis_private_bytes!
4000000!5000000$USER1$/check_nrpe -t 60 -H $USER21$ -c get_iis_privatebytes -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" number_graph wmi_iis_total_not_found_errors check_wmi_iis_total_not_found_errors!
Name=_Total!500!600$USER1$/check_nrpe -t 60 -H $USER21$ -c get_iis_totalnotfounderrors -a "$HOSTADDRESS$" "$ARG1$" "$ARG2$" "$ARG3$" number_graph wmi_service_Dfs check_wmi_service!Dfs $USER1$/check_nrpe -H $USER21$ -t 60 -c get_service -a "$HOSTADDRESS$" "$ARG1$" percent_graph wmi_service_IsmServ check_wmi_service!IsmServ $USER1$/check_nrpe -H $USER21$ -t 60 -c get_service -a "$HOSTADDRESS$" "$ARG1$" percent_graph wmi_service_W3SVC check_wmi_service!W3SVC $USER1$/check_nrpe -H $USER21$ -t 60 -c get_service -a "$HOSTADDRESS$" "$ARG1$" percent_graph
Profile Package
This package includes the following files:
Profile Definitions
- service-profile-wmi-iis.xml
- perfconfig-wmi-iis.xml
Plugins Scripts on the GroundWork Monitor Server
- check_nrpe
WMI Scripts on the WMI Proxy Server
- nrpe_nt.zip
Performance Graphing Programs
- number_graph.cgi
- percent_graph.cgi
Installation
GroundWork Monitor includes many monitoring profiles for a variety of devices, systems and applications. Profiles already imported on a new GroundWork installation include Service Ping, SNMP Network, and SSH UNIX. The GroundWork Monitor Configuration tool is used to import updated Profiles and Profiles that require additional setup; the Profile XML file and its companion Performance Configuration definition file. Services can also be imported in addition to Service Profiles in the Profile Importer. The import process is documented under GROUNDWORK PROFILES > How to import profiles.
Implementation
This section contains detail settings used by this Profile. These parameters can be altered with the Configuration tool.
Command Parameters
Command parameters are in the Configuration Services section with the following names and default values.
wmi_iis_bytes_received
- Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_iis_bytes_received command as defined in the nrpe.cfg against the host $HOSTADDRESS$.
- Default web server instance is _Total
- $ARG1$ - Instance, e.g. Name=_Total
- Default warning threshold for number of bytes received 6000
- $ARG2$ - Warning number
- Default critical threshold for number of bytes received 12000
- $ARG3$ - Critical number
wmi_iis_bytes_sent
- Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_iis_bytes_sent command as defined in the nrpe.cfg against the host $HOSTADDRESS$.
- Default web server instance is _Total
- $ARG1$ - Instance, e.g. Name=_Total
- Default warning threshold for number of bytes sent 6000000
- $ARG2$ - Warning number
- Default critical threshold for number of bytes sent 12000000
- $ARG3$ - Critical number
wmi_iis_bytes_total
- Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_iis_bytes_total command as defined in the nrpe.cfg against the host $HOSTADDRESS$.
- Default web server instance is _Total
- $ARG1$ - Instance, e.g. Name=_Total
- Default warning threshold for number of bytes total 500000
- $ARG2$ - Warning number
- Default critical threshold for number of bytes total 600000
- $ARG3$ - Critical number
wmi_iis_current_connections
- Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_iis_currentconnections command as defined in the nrpe.cfg against the host $HOSTADDRESS$.
- Default web server instance is _Total
- $ARG1$ - Instance, e.g. Name=_Total
- Default warning threshold for number of current connections 200
- $ARG2$ - Warning number
- Default critical threshold for number of current connections 400
- $ARG3$ - Critical number
wmi_iis_current_nonanonymous_users
- Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_iis_curnonanonusers command as defined in the nrpe.cfg against the host $HOSTADDRESS$.
- Default web server instance is _Total
- $ARG1$ - Instance, e.g. Name=_Total
- Default warning threshold for number of current users 50
- $ARG2$ - Warning number
- Default critical threshold for number of current users 80
- $ARG3$ - Critical number
wmi_iis_get_requests
- Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_iis_get_requests command as defined in the nrpe.cfg against the host $HOSTADDRESS$.
- Default web server instance is _Total
- $ARG1$ - Instance, e.g. Name=_Total
- Default warning threshold for number of get requests per second 200
- $ARG2$ - Warning number
- Default critical threshold for number of get requests per second 400
- $ARG3$ - Critical number
wmi_iis_maximum_connections
- Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_iis_maximumconnections command as defined in the nrpe.cfg against the host $HOSTADDRESS$.
- Default web server instance is _Total
- $ARG1$ - Instance, e.g. Name=_Total
- Default warning threshold for number of current connections 50
- $ARG2$ - Warning number
- Default critical threshold for number of current connections 60
- $ARG3$ - Critical number
wmi_iis_post_requests
- Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_iis_post_requests command as defined in the nrpe.cfg against the host $HOSTADDRESS$.
- Default web server instance is _Total
- $ARG1$ - Instance, e.g. Name=_Total
- Default warning threshold for number of post requests per second 200
- $ARG2$ - Warning number
- Default critical threshold for number of post requests per second 400
- $ARG3$ - Critical number
wmi_iis_private_bytes
- Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_iis_privatebytes command as defined in the nrpe.cfg against the host $HOSTADDRESS$.
- Default warning threshold for size of IIS private bytes 4000000
- $ARG1$ - Warning number
- Default critical threshold for size of IIS private bytes 5000000
- $ARG2$ - Critical number
wmi_iis_total_not_found
- Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_iis_totalnotfounderrors command as defined in the nrpe.cfg against the host $HOSTADDRESS$.
- Default web server instance is _Total
- $ARG1$ - Instance, e.g. Name=_Total
- Default warning threshold for number of not found errors 500
- $ARG2$ - Warning number
- Default critical threshold for number of current connections 600
- $ARG3$ - Critical number
wmi_service
- Uses check_nrpe plugin to connect to NRPE on $USER21$ and execute the get_service command as defined in the nrpe.cfg against the host $HOSTADDRESS$.
- $ARG1$ - Service Name (not Display Name!)
- OK if service is running
- CRITICAL is service is stopped.
- UNKNOWN is service is not installed.
Performance Graphing Parameters
The following parameters are used to generate performance charts. These parameters are set using the Configuration>Performance tool in GroundWork Monitor.
wmi_iis_bytes_received
- Graphs the number of bytes the web server received per second.
- Nagios service description must contain the string iis_bytes_received.
wmi_iis_bytes_sent
- Graphs the number of bytes the web server sent per second.
- Nagios service description must contain the string iis_bytes_received.
wmi_iis_bytes_total
- Graphs the number of bytes the web server sent and received per second.
- Nagios service description must contain the string iis_bytes_received.
wmi_iis_current_connections
- Graphs the number of connections to the web server.
- Nagios service description must contain the string iis_bytes_received.
wmi_iis_current_nonanonymous_users
- Graphs the number of nonanonymous users connected to the web server.
- Nagios service description must contain the string iis_bytes_received.
wmi_iis_get_requests
- Graphs the number of get requests per second to the web server.
- Nagios service description must contain the string iis_bytes_received.
wmi_iis_maximum_connections
- Graphs the maximum number of connections the web server has had since starting.
- Nagios service description must contain the string iis_bytes_received.
wmi_iis_post_requests
- Graphs the number of post requests per second to the web server.
- Nagios service description must contain the string iis_bytes_received.
wmi_iis_private_bytes
- Graphs the number of private bytes the inetinfo process is using.
- Nagios service description must contain the string iis_bytes_received.
wmi_iis_total_not_found_errors
- Graphs the number of not found errors since the web server has started.
- Nagios service description must contain the string iis_bytes_received.
Implementation Notes
The steps are:
- The nrpe.cfg file on the Windows server maps commands issued by the GroundWork server to scripts in the c:\nrpe_nt directory. Commands issued by this profile are installed with this package. If new NRPE commands are added, this file must be modified. Go to the GroundWork Support Portal - GroundWork Connect at www.groundworkconnect.com and search for Installing GroundWork WMI NRPE.
- The WMI proxy server must be in the same domain as target monitored Windows server, and must have administrator rights.