Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

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 page.

HeaderDescription
namespaceThe name of the resource being monitored.
metricsThe metrics being retrieved from the monitored resource.
time\_grainThe 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.

Parent Topic:Agent Client Collector Monitoring reference