Internet Information Services Stay organized with collections Save and categorize content based on your preferences.
The Internet Information Services (IIS) integration collects telemetry fromyour IIS web servers. The metrics provide connection informationand also data on transferred bytes. The integration also collects informationfrom access logs.
For more information on IIS, see theInternet Information Services documentation.
Before you begin
The Ops Agent version 2.15.0 introduces support for a new set ofIIS metrics using theworkload.googleapis.com/ prefix. Youmust configure the agent to collect these metrics, as described inExample configuration.
The Ops Agent has always supported a limited set of IIS metrics;these metrics use theagent.googleapis.com/iis/ prefix. No additionalconfiguration is needed to collect these metrics on Windows VMs.
This document refers to theagent-prefixed metrics as thev1 metricsand to theworkload-prefixed metrics as thev2 metrics.For tables of these metrics, seeWhat is monitored.
Starting with the Ops Agent version 2.15.0, you can configurethe agent to collect v1 metrics, v2 metrics, or both.
Note:If you have alerts or other configurations built on the v1 metrics andyou switch to the v2 metrics, then you have to migrate your configurationsas well. If you stop collecting v1 metrics, then alerts and other monitoring ofthose metrics will stop working. The following table shows the mapping ofv1 metrics to v2 metrics:v1 metric (agent.googleapis.com/iis/) | v2 metric (workload.googleapis.com/) |
|---|---|
current_connections | iis.connection.active |
network/transferred_bytes_count | iis.network.io |
new_connection_count | iis.connection.attempt.count |
request_count | iis.request.count |
Prerequisites
To collect IIS telemetry, you mustinstall the Ops Agent:
- For metrics v1, install version 1.0.0 or higher.
- For metrics v2, install version 2.15.0 or higher
- For logs, install version 2.14.0 or higher.
This integration supports IIS versions 8.5 and 10.0.
Configure the Ops Agent for IIS
Following the guide toconfigure the OpsAgent, add the required elementsto collect telemetry from IIS instances, andrestart the agent.
Example configuration
The following commands create the configuration to collect and ingesttelemetry for IIS:
$ErrorActionPreference='Stop'#Thisconfiggetsmergedwiththebuilt-inOpsAgentconfig,whichalready#includesthev1receiverinthedefaultpipeline.#Becausethev2receiverhereusesauniqueID,itdoesnotoverwrite#thedefaultreceiverandsobothreceiverswillbeactivesimultaneously#duringthetest.#Createanemptyconfig.yamlfileifitdoesn'texist.$configFilePath='C:\ProgramFiles\Google\CloudOperations\OpsAgent\config\config.yaml'if(-not(Test-Path-Path$configFilePath-PathTypeLeaf)){New-Item-ItemTypeFile-Path$configFilePath-Force|Out-Null}#Createabackupoftheexistingfilesoexistingconfigurationsarenotlost.Copy-Item-Path'C:\ProgramFiles\Google\CloudOperations\OpsAgent\config\config.yaml'-Destination'C:\ProgramFiles\Google\CloudOperations\OpsAgent\config\config.yaml.bak'#ConfiguretheOpsAgent.Add-Content'C:\ProgramFiles\Google\CloudOperations\OpsAgent\config\config.yaml'"metrics: receivers: iis_v2: type: iis receiver_version: 2 service: pipelines: iispipeline: receivers: - iis_v2logging: receivers: iis_access: type: iis_access service: pipelines: iis: receivers: - iis_access"if(Get-Servicegoogle-cloud-ops-agent*-ErrorActionSilentlyContinue){(Get-Servicegoogle-cloud-ops-agent*).WaitForStatus('Running','00:03:00')}For these changes to take effect, you must restart the Ops Agent:
- Connect to your instance using RDP or a similar tool and login to Windows.
- Open a PowerShell terminal with administrator privileges by right-clicking the PowerShell icon and selectingRun as Administrator
- To restart the agent, run the following PowerShell command:
Restart-Service google-cloud-ops-agent -Force
- To confirm that the agent restarted, run the following command and verify that the components "Metrics Agent" and "Logging Agent" started:
Get-Service google-cloud-ops-agent*
This receiver supports only the default W3C logging format.
Configure logs collection
To ingest access logs from IIS, you must create receivers for thelogs and then create a pipeline for the new receivers.
To configure a receiver for youriis_access logs, specify the followingfields:
| Field | Default | Description |
|---|---|---|
exclude_paths | [] | A list of filesystem path patterns to exclude from the set matched byinclude_paths. |
include_paths | ['C:\inetpub\logs\LogFiles\W3SVC1\u_ex*'] | A list of filesystem paths to read by tailing each file. A wild card (*) can be used in the paths; for example,C:\inetpub\logs\LogFiles\W3SVC1\u_ex*. |
type | The value must beiis_access. | |
record_log_file_path | false | If set totrue, then the path to the specific file from which the log record was obtained appears in the output log entry as the value of theagent.googleapis.com/log_file_path label. When using a wildcard, only the path of the file from which the record was obtained is recorded. |
wildcard_refresh_interval | 60s | The interval at which wildcard file paths ininclude_paths are refreshed. Specified as a time interval parsable bytime.ParseDuration, for example 30s or 2m. This property might be useful under high logging throughputs where log files are rotated faster than the default interval. |
What is logged
ThelogName is derived from the receiver IDs specified in the configuration.Detailed fields inside theLogEntryare as follows.
iis_access logs contain the following fields in theLogEntry:
| Field | Type | Description |
|---|---|---|
httpRequest.referer | string | Contents of theReferer header |
httpRequest.remoteIp | string | IP of the client that made the request |
httpRequest.requestMethod | string | HTTP method |
httpRequest.requestUrl | string | Request URL (typically just the path part of the URL) |
httpRequest.serverIp | string | The server's IP and port that was requested |
httpRequest.status | number | HTTP status code |
httpRequest.userAgent | string | Contents of theUser-Agent header |
jsonPayload.sc_substatus | number | The substatus error code |
jsonPayload.sc_win32_status | number | The Windows status code |
jsonPayload.time_taken | number | The length of time that the action took, in milliseconds |
jsonPayload.user | string | Authenticated username for the request |
timestamp | string (Timestamp) | Time the request was received |
Configure v1 metrics collection
The Ops Agent on a Microsoft Windows VM automatically collectsIIS v1 metrics. No additional configuration is required.For information about collectingonly v2 metrics, seeConfigure v2 metricscollection.
After you set up a new IIS instance, IIS might notimmediately report any metrics. Using the Server Manager console that comesinstalled on Windows Server, you might see that your server has a status ofOnline - Performance Counters not started in the Manageability column.
One way to enable IIS to generate metrics is to right click onyour IIS server in the Server Manager console and selectStart Performance Counters. Your server should begin sending metrics tothe Ops Agent.
Configure v2 metrics collection
To ingest v2 metrics from IIS, you must create a receiver for themetrics that IIS produces and then create a pipeline for the newreceiver.
This receiver does notsupport the use of multiple instances in the configuration, for example, tomonitor multiple endpoints. All such instances write to the same time series,and Cloud Monitoring has no way to distinguish among them.
To configure a receiver for youriis metrics, specify the followingfields:
| Field | Default | Description |
|---|---|---|
collection_interval | 60s | A time.Duration value, such as 30s or 5m. |
receiver_version | Version of the metrics collected; use2 to collect v2 metrics. | |
type | This value must beiis. |
By default, the v1 metrics are collected automatically. You can either augmentthe v1 metrics by additionally collecting v2 metrics, or you can overridethe v1 metrics to collect only v2 metrics.
To collectonly v2 metrics, do the following:
- Name your receiver
iis. - Set the
typefield toiis. - Set the
receiver_versionfield to2. - Use this receiver in your
default_pipelinepipeline.This configuration overrides the built-in configuration of theiisreceiver.
- Name your receiver
To collect both v1 and v2 metrics, do the following:
- Name your receiver something other than
iis, likeiis_v2. - Set the
typefield toiis. - Set the
receiver_versionto2. - Use this receiver in your new pipeline.This configuration adds a v2 receiver rather than overriding the built-inreceiver. The script inExample configuration uses thisapproach.
- Name your receiver something other than
What is monitored
Starting with version 2.15.0, the Ops Agent can collect two differentsets of metrics:
- The v1 metrics:
agent.googleapis.com/iis/. - The v2 metrics:
workload.googleapis.com/.
V1 metrics
The following table provides the list of v1 metrics that the Ops Agent collectsfrom the IIS instance.
The "metric type" strings in this table must be prefixed withagent.googleapis.com/iis/. That prefix has been omitted from the entries in the table. When querying a label, use themetric.labels. prefix; for example,metric.labels.LABEL="VALUE".
| Metric type Launch stage (Resource hierarchy levels) Display name | |
|---|---|
| Kind, Type, Unit Monitored resources | Description Labels |
current_connectionsGA (project)IIS open connections | |
GAUGE, DOUBLE, 1aws_ec2_instance gce_instance | Currently open connections to IIS. Sampled every 60 seconds. |
network/transferred_bytes_countGA (project)IIS transferred bytes | |
CUMULATIVE, INT64, Byaws_ec2_instance gce_instance | Network bytes transferred by IIS. Sampled every 60 seconds.direction: Direction (sent, received) |
new_connection_countGA (project)IIS connections | |
CUMULATIVE, INT64, 1aws_ec2_instance gce_instance | Connections opened to IIS. Sampled every 60 seconds. |
request_countGA (project)IIS requests | |
CUMULATIVE, INT64, 1aws_ec2_instance gce_instance | Requests made to IIS. Sampled every 60 seconds.http_method: Http method (post, put, get, delete, option, trace, head) |
Table generated at 2026-02-12 22:12:11 UTC.
V2 metrics
The following table provides the list of v2 metrics that the Ops Agent collectsfrom the IIS instance.
| Metric type | |
|---|---|
| Kind, Type Monitored resources | Labels |
workload.googleapis.com/iis.connection.active | |
GAUGE, INT64gce_instance | |
workload.googleapis.com/iis.connection.anonymous | |
CUMULATIVE, INT64gce_instance | |
workload.googleapis.com/iis.connection.attempt.count | |
CUMULATIVE, INT64gce_instance | |
workload.googleapis.com/iis.network.blocked | |
CUMULATIVE, INT64gce_instance | |
workload.googleapis.com/iis.network.file.count | |
CUMULATIVE, INT64gce_instance | direction |
workload.googleapis.com/iis.network.io | |
CUMULATIVE, INT64gce_instance | direction |
workload.googleapis.com/iis.request.count | |
CUMULATIVE, INT64gce_instance | request |
workload.googleapis.com/iis.request.queue.age.max | |
GAUGE, INT64gce_instance | |
workload.googleapis.com/iis.request.queue.count | |
GAUGE, INT64gce_instance | |
workload.googleapis.com/iis.request.rejected | |
CUMULATIVE, INT64gce_instance | |
workload.googleapis.com/iis.thread.active | |
GAUGE, INT64gce_instance | |
workload.googleapis.com/iis.uptime | |
GAUGE, INT64gce_instance | |
Verify the configuration
This section describes how to verify that you correctly configured theIIS receiver. It might take one or twominutes for the Ops Agent to begin collecting telemetry.
To verify that IIS logs are being sent toCloud Logging, do the following:
In the Google Cloud console, go to theLogs Explorer page:
If you use the search bar to find this page, then select the result whose subheading isLogging.
- Enter the following query in the editor, and then clickRun query:
resource.type="gce_instance"log_id("iis_access")
To verify that IIS metrics are being sent toCloud Monitoring, do the following:
In the Google Cloud console, go to theleaderboard Metrics explorer page:
If you use the search bar to find this page, then select the result whose subheading isMonitoring.
- In the toolbar of thequery-builder pane, select the button whose name is eithercode MQL orcode PromQL.
- Verify thatPromQL is selectedin theLanguage toggle. The language toggle is in the same toolbar thatlets you format your query.
- For v1 metrics, enter the following query in the editor, and then clickRun query:
{"agent.googleapis.com/iis/request_count", monitored_resource="gce_instance"} - For v2 metrics, enter the following query in the editor, and then clickRun:
{"workload.googleapis.com/iis.request.count", monitored_resource="gce_instance"}
View dashboard
To view your IIS metrics, you must have a chart or dashboardconfigured.The IIS integration includes one or more dashboards for you.Any dashboards are automatically installed after you configure theintegration and the Ops Agent has begun collecting metric data.
You can also view static previews of dashboards withoutinstalling the integration.
To view an installed dashboard, do the following:
In the Google Cloud console, go to the Dashboards page:
If you use the search bar to find this page, then select the result whose subheading isMonitoring.
- Select theDashboard List tab, and then choose theIntegrations category.
- Click the name of the dashboard you want to view.
If you have configured an integration but the dashboard has not beeninstalled, then check that the Ops Agent is running. When there is nometric data for a chart in the dashboard, installation of the dashboard fails.After the Ops Agent begins collecting metrics, the dashboard is installedfor you.
To view a static preview of the dashboard, do the following:
In the Google Cloud console, go to the
Integrations page:If you use the search bar to find this page, then select the result whose subheading isMonitoring.
- Click theCompute Engine deployment-platform filter.
- Locate the entry for IIS and clickView Details.
- Select theDashboards tab to see a static preview. If the dashboard is installed, then you can navigate to it by clickingView dashboard.
For more information about dashboards in Cloud Monitoring, seeDashboards and charts.
For more information about using theIntegrations page, seeManage integrations.
Install alerting policies
Alerting policies instruct Cloud Monitoring to notify you whenspecified conditions occur.The IIS integration includes one or more alerting policies foryou to use.You can view and installthese alerting policies from theIntegrations page inMonitoring.
To view the descriptions of available alerting policies and install them, do the following:
In the Google Cloud console, go to the
Integrations page:If you use the search bar to find this page, then select the result whose subheading isMonitoring.
- Locate the entry for IIS and clickView Details.
- Select theAlerts tab. This tab provides descriptions of available alerting policies and provides an interface for installing them.
- Install alerting policies. Alerting policies need to know where to send notifications that the alert has been triggered, so they require information from you for installation. To install alerting policies, do the following:
- From the list of available alerting policies, select those that you want to install.
In theConfigure notifications section, select one or more notification channels. You have the option to disable the use of notification channels, but if you do, then your alerting policies fire silently. You can check their status in Monitoring, but you receive no notifications.
For more information about notification channels, seeManage notification channels.
- ClickCreate Policies.
For more information about alerting policies in Cloud Monitoring, seeIntroduction to alerting.
For more information about using theIntegrations page, seeManage integrations.
What's next
For a walkthrough on how to use Ansible to install the Ops Agent, configurea third-party application, and install a sample dashboard, see theInstall the Ops Agent to troubleshoot third-party applications video.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-18 UTC.