Skip to content

IIS Alert Runbook

Purpose

This runbook covers the IIS alerts generated from windows_exporter.

The primary objectives are:

  1. restore service safely;
  2. identify whether the problem is IIS, the application pool, the worker process, Windows resources, or the application itself;
  3. preserve useful evidence before restarting or recycling components.

The IIS dashboards are:

  • IIS — Prometheus metrics
  • IIS Logs — IIS access/error logs in Loki

Before changing anything

Record:

  • alert name;
  • hostname;
  • IIS site, if present;
  • application pool, if present;
  • alert start time;
  • recent deployments or configuration changes.

From PowerShell:

Get-Date
Get-Website | Format-Table Name,Id,State,PhysicalPath
Get-IISAppPool | Format-Table Name,State
Get-Service W3SVC,WAS | Format-Table Name,Status,StartType

Check recent Windows events:

Get-WinEvent -FilterHashtable @{
    LogName='System'
    StartTime=(Get-Date).AddMinutes(-30)
} | Where-Object {
    $_.ProviderName -match 'WAS|W3SVC|IIS'
} | Select-Object TimeCreated,ProviderName,Id,LevelDisplayName,Message |
    Format-List

For application errors, also inspect:

Get-WinEvent -FilterHashtable @{
    LogName='Application'
    StartTime=(Get-Date).AddMinutes(-30)
} | Select-Object TimeCreated,ProviderName,Id,LevelDisplayName,Message |
    Format-List

Do not immediately recycle an application pool when a crash, startup failure, or configuration problem is suspected. Capture the evidence first.


IISApplicationPoolNotRunning

Meaning

The monitored application pool is not in the Running state for at least five minutes.

This is critical because requests for applications using that pool may fail.

First checks

Get-IISAppPool | Format-Table Name,State

For the affected pool:

Get-WebAppPoolState -Name '<APP_POOL>'

Check the corresponding IIS/WAS events:

Get-WinEvent -FilterHashtable @{
    LogName='System'
    StartTime=(Get-Date).AddMinutes(-30)
} | Where-Object {
    $_.ProviderName -match 'WAS|W3SVC'
} | Select-Object TimeCreated,ProviderName,Id,LevelDisplayName,Message |
    Format-List

Check the IIS dashboard for:

  • worker process count;
  • worker process failures;
  • request queue;
  • rejected requests.

Check the IIS Logs dashboard for recent 4xx/5xx responses.

Remediation

If the pool is stopped and there is no evidence of an active configuration or application failure:

Start-WebAppPool -Name '<APP_POOL>'

Then verify:

Get-WebAppPoolState -Name '<APP_POOL>'

If it immediately stops again, do not repeatedly start it. Investigate WAS/application events and rapid-fail protection.

If the application is known to be safe to recycle:

Restart-WebAppPool -Name '<APP_POOL>'

Verify recovery

Get-WebAppPoolState -Name '<APP_POOL>'
Get-WebAppPoolState -Name '<APP_POOL>' | Format-List

Confirm:

  • pool is Running;
  • worker process count is greater than zero;
  • request queue is falling;
  • new IIS requests return expected status codes;
  • Prometheus alert resolves.

IISWorkerProcessFailure

Meaning

One or more worker process failures were recorded for the application pool during the previous 10 minutes.

A single crash does not necessarily mean the application is unavailable, so this starts as a warning.

First checks

Get-IISAppPool | Format-Table Name,State
Get-Process w3wp -ErrorAction SilentlyContinue |
    Select-Object Id,ProcessName,StartTime,CPU

Check recent WAS/IIS events:

Get-WinEvent -FilterHashtable @{
    LogName='System'
    StartTime=(Get-Date).AddMinutes(-30)
} | Where-Object {
    $_.ProviderName -match 'WAS|W3SVC'
} | Select-Object TimeCreated,ProviderName,Id,LevelDisplayName,Message |
    Format-List

Look for application crashes in the Application log:

Get-WinEvent -FilterHashtable @{
    LogName='Application'
    StartTime=(Get-Date).AddMinutes(-30)
} | Where-Object {
    $_.ProviderName -match 'Application Error|\.NET Runtime'
} | Select-Object TimeCreated,ProviderName,Id,LevelDisplayName,Message |
    Format-List

Remediation

Do not automatically recycle repeatedly.

If the application pool is running and service is healthy, continue investigation first.

If the worker process is repeatedly crashing and the application has a known safe recovery procedure, recycle once:

Restart-WebAppPool -Name '<APP_POOL>'

If failures continue, escalate as an application/runtime problem and preserve the event-log evidence.


IISWorkerProcessStartupFailure

Meaning

IIS/WAS failed to start a worker process for the application pool.

This commonly indicates a startup/configuration/runtime problem rather than ordinary traffic load.

Checks

Get-WebAppPoolState -Name '<APP_POOL>'
Get-IISAppPool -Name '<APP_POOL>' | Format-List *

Inspect:

Get-WinEvent -FilterHashtable @{
    LogName='System'
    StartTime=(Get-Date).AddMinutes(-30)
} | Where-Object {
    $_.ProviderName -match 'WAS|W3SVC'
} | Select-Object TimeCreated,ProviderName,Id,LevelDisplayName,Message |
    Format-List

Check application configuration and recent deployment changes before making another restart attempt.


IISRequestQueueGrowing

Meaning

The IIS HTTP request queue has remained above 100 requests for at least ten minutes.

The threshold is a starting point. High-volume sites may require a different baseline.

Checks

Prometheus:

windows_iis_http_requests_current_queue_size

PowerShell:

Get-IISAppPool | Format-Table Name,State
Get-Process w3wp -ErrorAction SilentlyContinue |
    Select-Object Id,CPU,WorkingSet,StartTime

Check the IIS Logs dashboard for:

  • slow requests;
  • 5xx responses;
  • request volume;
  • affected URLs.

Remediation

First determine whether the queue is caused by:

  • application CPU saturation;
  • database/backend latency;
  • worker process failure;
  • insufficient worker capacity;
  • an external dependency;
  • a sudden traffic increase.

Do not increase IIS queue limits simply to suppress the alert.

If the worker process is unhealthy, use the application pool recovery procedure above.


IISRejectedRequests

Meaning

More than ten HTTP requests were rejected during a five-minute period.

This is a warning because rejection can be caused by temporary capacity pressure, but sustained rejection can represent user-visible failure.

Checks

Inspect the IIS Logs dashboard and filter the error panel for the affected site.

Useful Loki query:

{source="iis",iis_site="<SITE>"} |~ " (4[0-9][0-9]|5[0-9][0-9]) "

Check:

Get-WebAppPoolState -Name '<APP_POOL>'
Get-Process w3wp -ErrorAction SilentlyContinue |
    Select-Object Id,CPU,WorkingSet,StartTime

Correlate rejection with queue size and worker-process failures before changing configuration.


IISWorkerProcessesMissing

Meaning

An application pool reports Running, but no worker process has been reported for at least five minutes.

This can indicate a WAS/worker-process startup problem or a metric collection problem.

Checks

Get-WebAppPoolState -Name '<APP_POOL>'

Get-Process w3wp -ErrorAction SilentlyContinue |
    Select-Object Id,ProcessName,StartTime,CPU,WorkingSet

Then check WAS events:

Get-WinEvent -FilterHashtable @{
    LogName='System'
    StartTime=(Get-Date).AddMinutes(-30)
} | Where-Object {
    $_.ProviderName -match 'WAS|W3SVC'
} | Select-Object TimeCreated,ProviderName,Id,LevelDisplayName,Message |
    Format-List

If IIS is healthy and the worker process exists but the metric remains zero, verify the windows_exporter service and its IIS collector before taking application action.


General recovery verification

After remediation:

Get-IISAppPool | Format-Table Name,State

Get-Process w3wp -ErrorAction SilentlyContinue |
    Select-Object Id,ProcessName,StartTime,CPU,WorkingSet

Check the IIS metrics dashboard for:

  • application pool state = Running;
  • worker process count > 0;
  • queue returning toward normal;
  • rejected requests returning to baseline.

Check the IIS Logs dashboard for successful requests and absence of a continuing 5xx spike.

Finally verify that the corresponding Prometheus alert has resolved.


Escalation

Escalate when:

  • the application pool repeatedly stops after restart;
  • worker processes repeatedly crash;
  • startup failures continue;
  • 5xx responses persist after IIS recovery;
  • queue depth continues increasing despite a healthy worker process;
  • the issue began immediately after a deployment/configuration change;
  • Windows/IIS events indicate an application/runtime or OS fault.

Preserve:

  • alert details;
  • relevant Prometheus graphs;
  • IIS log samples;
  • System/Application event-log entries;
  • recent deployment/configuration changes.

Do not repeatedly restart IIS, WAS, or the entire Windows server as a first response. Repeated restarts can destroy useful diagnostic evidence and mask the underlying fault.


Operational links

The same runbook paths are attached to Prometheus and Loki alert rules through the runbook_path annotation. Alertmanager notification templates resolve the path against the deployment's RUNBOOK_BASE_URL.