Azure metrics script

  • 릴리스 버전: Australia
  • 업데이트 날짜 2026년 03월 12일
  • 소요 시간: 1분
  • 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.
    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.
    • 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.