---
title: IIS
description: Track total or per-site metrics and monitor each site's up/down status.
breadcrumbs: Docs > Integrations > IIS
---

# IIS
Supported OS Integration version5.6.0


## Overview{% #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.

**Minimum Agent version:** 6.0.0

## Setup{% #setup %}

### Installation{% #installation %}

The IIS check is packaged with the Agent. To start gathering your IIS metrics and logs, [install the Agent](https://app.datadoghq.com/account/settings/agent/latest) on your IIS servers.

#### Host{% #host %}

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

##### Metric collection{% #metric-collection %}

1. Edit the `iis.d/conf.yaml` file in the [Agent's `conf.d` directory](https://docs.datadoghq.com/agent/basic_agent_usage/windows/#agent-check-directory-structure) at the root of your [Agent's configuration directory](https://docs.datadoghq.com/agent/guide/agent-configuration-files/#agent-configuration-directory) to start collecting your IIS site data. See the [sample iis.d/conf.yaml](https://github.com/DataDog/integrations-core/blob/master/iis/datadog_checks/iis/data/conf.yaml.example) for all available configuration options.

1. [Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-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](https://github.com/DataDog/integrations-core/blob/7.33.x/iis/datadog_checks/iis/data/conf.yaml.example).

##### Log collection{% #log-collection %}

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

   ```yaml
   logs_enabled: true
   ```

1. Add this configuration block to your `iis.d/conf.yaml` file to start collecting your IIS Logs:

   ```yaml
   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](https://github.com/DataDog/integrations-core/blob/master/iis/datadog_checks/iis/data/conf.yaml.example) for all available configuration options.

1. [Restart the Agent](https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-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](https://docs.datadoghq.com/logs/guide/log-collection-troubleshooting-guide/#permission-issues-tailing-log-files) for more information.

### Validation{% #validation %}

[Run the Agent's status subcommand](https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information) and look for `iis` under the Checks section.

## Data Collected{% #data-collected %}

### Metrics{% #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{% #events %}

The IIS check does not include any events.

### Service Checks{% #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{% #troubleshooting %}

Need help? Contact [Datadog support](https://docs.datadoghq.com/help/).
