IIS Integration

The IIS integration collects metrics from Internet Information Services (IIS) on Windows Server through the Middleware Windows agent. Use it to see the state of every app pool, alert when one stops, and track requests, queues, connections and traffic per site.

The agent reads the local IIS performance counters, so there is no endpoint, port or password to configure.

Prerequisites#

  • Windows Server with the Web Server (IIS) role installed.
  • The Middleware Windows agent v2.0.1 or later, installed on the IIS server. See Installing the Agent

Hosts on an older agent version ignore the IIS setting until the agent is upgraded. Nothing breaks; the IIS metrics just don't appear yet.

Setup#

1 Open the Integration in Middleware#

Go to Installation > Integrations, then open IIS (under the Windows category).

2 Choose the Hosts#

Select the Windows hosts that run IIS.

3 Set the Collection Interval#

Collection Interval is how often the agent reads the IIS counters. It defaults to 60s. Use a shorter value, such as 30s, if you want app pool alerts to react faster.

4 Save#

Click Save Configuration. The agent picks up the new configuration and starts sending IIS metrics within a few minutes.

Visualize Your Data#

Open Dashboards and select the prebuilt IIS dashboard. It shows app pool state and uptime, and per-site requests, connections and traffic.

The Data Collected tab of the IIS integration lists every metric the integration reports.

Alert When an App Pool Goes Down#

Go to Alerts > Create Alert and create a metric alert with:

SettingValue
Metriciis.application_pool.state, aggregated with max
Group byhost.name, iis.application_pool
Conditionabove 3
Evaluatemin over 5 minutes
Notify on no dataon

App pool state values:

ValueState
1Uninitialized
2Initialized
3Running
4Disabling
5Disabled (stopped)
6Shutdown pending
7Delete pending

A pool that is stopped by hand, or stopped by IIS rapid-fail protection after its worker process keeps crashing, reports 5 and keeps reporting it. So "above 3" catches both. Notify on no data covers the case where the pool is deleted or the agent stops reporting.

Metrics Collected#

App Pools#

Reported per app pool, with the iis.application_pool attribute.

MetricDescription
iis.application_pool.stateCurrent state of the app pool (see the table above).
iis.application_pool.uptimeTime since the app pool last started.
iis.request.queue.countRequests waiting in the app pool's queue.
iis.request.queue.age.maxAge of the oldest request in the queue.
iis.request.rejectedRequests rejected by the app pool.

Sites#

Reported per site, with the iis.site attribute.

MetricDescription
iis.request.countRequests, by HTTP method (request attribute).
iis.connection.activeActive connections.
iis.connection.attempt.countConnection attempts.
iis.connection.anonymousConnections made anonymously.
iis.network.ioBytes sent and received (direction attribute).
iis.network.file.countFiles sent and received (direction attribute).
iis.network.blockedBytes blocked by bandwidth throttling.
iis.uptimeTime since the site's web service started.

Server#

MetricDescription
iis.thread.activeActive IIS threads.
  • iis.application_pool.uptime can occasionally be missing for all app pools, when Windows fails to read the uptime counter. Alert on iis.application_pool.state, not on uptime.
  • You may see an app pool named ---1 on the request queue metrics. It is an internal Windows HTTP queue that does not belong to any pool, and can be ignored.

Troubleshooting#

  • Check that the host runs the Windows agent v2.0.1 or later.
  • Check that the IIS role is installed and the World Wide Web Publishing Service (W3SVC) is running.
  • Wait a few minutes after saving: the agent applies new configuration on its next check.

With the settings above, the alert waits until the pool has been down for the whole 5-minute window, so a brief recycle does not page you. Shorten the window if you need a faster alert.

Need assistance or want to learn more about Middleware? Get in touch with us via our Contact Us or join our Slack channel.

What did you think of this content?