IIS

Supported OS Windows

Integration version5.0.0

IIS Graph

Overview

Collect IIS metrics aggregated across all of your sites, or on a per-site basis. The IIS Agent check collects metrics for active connections, bytes sent and received, request count by HTTP method, and more. It also sends a service check for each site, letting you know whether it’s up or down.

Setup

Installation

The IIS check is packaged with the Agent. To start gathering your IIS metrics and logs, install the Agent on your IIS servers.

Host

To configure this check for an Agent running on a host:

Metric collection
  1. Edit the iis.d/conf.yaml file in the Agent’s conf.d directory at the root of your Agent’s configuration directory to start collecting your IIS site data. See the sample iis.d/conf.yaml for all available configuration options.

  2. Restart the Agent to begin sending IIS metrics to Datadog.

Note: Versions 2.14.0 or later of this check use a new implementation for metric collection, which requires Python 3. For hosts that are unable to use Python 3, or if you would like to use a legacy version of this check, refer to the following config.

Log collection
  1. Collecting logs is disabled by default in the Datadog Agent, enable it in your datadog.yaml file:

    logs_enabled: true
    
  2. Add this configuration block to your iis.d/conf.yaml file to start collecting your IIS Logs:

    logs:
      - type: file
        path: C:\inetpub\logs\LogFiles\W3SVC1\u_ex*
        service: myservice
        source: iis
    

    Change the path and service parameter values and configure them for your environment. See the sample iis.d/conf.yaml for all available configuration options.

  3. Restart the Agent.

Note: Ensure the datadog-agent user has read and execute access to tail the log files you want to collect from. When IIS creates a new sub-folder (such as when a new site is created), the permissions of the parent folder are not automatically inherited. See Permission issues tailing log files for more information.

Validation

Run the Agent’s status subcommand and look for iis under the Checks section.

Data Collected

Metrics

iis.app_pool.recycle.count
(count)
The number of times that the application pool has been recycled since Windows Process Activation Service (WAS) started.
iis.app_pool.state
(gauge)
The current status of the application pool (1 - Uninitialized, 2 - Initialized, 3 - Running, 4 - Disabling, 5 - Disabled, 6 - Shutdown Pending, 7 - Delete Pending).
iis.app_pool.uptime
(gauge)
The length of time, in seconds, that the application pool has been running since it was started.
Shown as second
iis.errors.locked
(gauge)
The number of locked errors per second (typically reported as an HTTP 423 response code)
Shown as error
iis.errors.not_found
(gauge)
The number of not found errors per second (typically reported as an HTTP 404 response code)
Shown as error
iis.httpd_request_method.delete
(gauge)
The number of DELETE requests per second
Shown as request
iis.httpd_request_method.get
(gauge)
The number of GET requests per second
Shown as request
iis.httpd_request_method.head
(gauge)
The number of HEAD requests per second
Shown as request
iis.httpd_request_method.options
(gauge)
The number of OPTIONS requests per second
Shown as request
iis.httpd_request_method.post
(gauge)
The number of POST requests per second
Shown as request
iis.httpd_request_method.put
(gauge)
The number of PUT requests per second
Shown as request
iis.httpd_request_method.trace
(gauge)
The number of TRACE requests per second
Shown as request
iis.net.bytes_rcvd
(gauge)
The number of bytes received per second
Shown as byte
iis.net.bytes_sent
(gauge)
The number of bytes served per second
Shown as byte
iis.net.bytes_total
(gauge)
The total number of bytes transferred per second
Shown as byte
iis.net.connection_attempts
(gauge)
The number of connection attempts since service startup
Shown as connection
iis.net.connection_attempts_sec
(gauge)
The number of connection attempts per second
Shown as connection
iis.net.files_rcvd
(gauge)
The number of files received per second
Shown as file
iis.net.files_sent
(gauge)
The number of files sent per second
Shown as file
iis.net.num_connections
(gauge)
The number of active connections
Shown as connection
iis.requests.cgi
(gauge)
The number of Common Gateway Interface requests executed per second
Shown as request
iis.requests.isapi
(gauge)
The number of ISAPI requests executed per second
Shown as request
iis.uptime
(gauge)
The amount of time the IIS server has been running
Shown as second
iis.users.anon
(gauge)
The number of requests from users over an anonymous connection per second
Shown as request
iis.users.nonanon
(gauge)
The number of requests from users over a non-anonymous connection per second
Shown as request

Events

The IIS check does not include any events.

Service Checks

iis.site_up
Returns CRITICAL if the uptime for a site is 0 and OK otherwise. The site uptime is collected via Windows Performance Data Helper using the ‘Web Service(*)\Service Uptime’ counter
Statuses: ok, critical

iis.app_pool_up
Returns CRITICAL if the tagged app_pool is down and OK otherwise.
Statuses: ok, critical

Troubleshooting

Need help? Contact Datadog support.