Azure metrics script
- UpdatedJul 31, 2025
- 1 minute read
- Zurich
- IT Operations Management
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.
Example
{
"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:
|