Azure metrics script
reference australia Updated Sep 10, 2026 1 min read azure-metrics-script.md
When creating a new policy for Azure cloud metrics, create a .json script to determine the metrics to be monitored. The format for the script appears below, followed by a table explaining the script contents.
JSON
{ "namespace": "Microsoft.Network/loadBalancers", "metrics": [ "AllocatedSnatPorts", "ByteCount", "DipAvailability", "PacketCount", "SnatConnectionCount", "SYNCount", "UsedSnatPorts", "VipAvailability" ], "time_grain": "PT1M"}Resources and their metrics are retrievable from the Supported metrics for Azure resources page.
|
Header |
Description |
|---|---|
|
namespace |
The name of the resource being monitored. |
|
metrics |
The metrics being retrieved from the monitored resource. |
|
time_grain |
The granularity of how often metrics are to be collected. Possible values are:- PT1M: Metric values are collected every minute.
|
78 lines · 2.4 KB
---
title: Azure metrics script
description: When creating a new policy for Azure cloud metrics, create a .json script to determine the metrics to be monitored. The format for the script appears below, followed by a table explaining the script contents.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/australia/it-operations-management/agent-client-collector/azure-metrics-script.html
release: australia
product: Agent Client Collector
classification: agent-client-collector
topic_type: reference
last_updated: "2026-09-10"
reading_time_minutes: 1
breadcrumb: [ACC-M reference, Agent Client Collector reference, Agent Client Collector, IT Operations Management]
---
# Azure metrics script
When creating a new policy for Azure cloud metrics, create a .json script to determine the metrics to be monitored. The format for the script appears below, followed by a table explaining the script contents.
```
{
"namespace": "Microsoft.Network/loadBalancers",
"metrics": [
"AllocatedSnatPorts",
"ByteCount",
"DipAvailability",
"PacketCount",
"SnatConnectionCount",
"SYNCount",
"UsedSnatPorts",
"VipAvailability"
],
"time_grain": "PT1M"
}
```
Resources and their metrics are retrievable from the [Supported metrics for Azure resources](https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-compute-virtualmachines-metrics) page.
<table id="table_v1g_1jw_mzb"><thead><tr><th>
Header
</th><th>
Description
</th></tr></thead><tbody><tr><td>
namespace
</td><td>
The name of the resource being monitored.
</td></tr><tr><td>
metrics
</td><td>
The metrics being retrieved from the monitored resource.
</td></tr><tr><td>
time\_grain
</td><td>
The granularity of how often metrics are to be collected. Possible values are:- PT1M: Metric values are collected every minute.
- PT5M: Metric values are collected every 5 minutes.
- PT15M: Metric values are collected every 15 minutes.
- PT30M: Metric values are collected every 30 minutes.
- PT1H: Metric values are collected every hour.
- PT1D: Metric values are collected daily.
</td></tr></tbody>
</table>**Parent Topic:**[Agent Client Collector Monitoring reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/agent-client-collector/acc-monitoring-reference.md)
| title | Azure metrics script |
| description | When creating a new policy for Azure cloud metrics, create a .json script to determine the metrics to be monitored. The format for the script appears below, followed by a table explaining the script contents. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/australia/it-operations-management/agent-client-collector/azure-metrics-script.html |
| release | australia |
| product | Agent Client Collector |
| classification | agent-client-collector |
| topic_type | reference |
| last_updated | 2026-09-10 |
| reading_time_minutes | 1 |
| breadcrumb | ACC-M referenceAgent Client Collector referenceAgent Client CollectorIT Operations Management |