{
  "GlobalSettings": {
    "type": "dynamic",
    "separator": "_",
    "commonReplaceChars": "/"
  },
  "vectors": [
    {
      "URL": "$BaseURL/providers/microsoft.insights/metrics?api-version={$apiVersion}&metricnames=cpu_percent%2Cphysical_data_read_percent%2Clog_write_percent%2Cstorage_percent%2Ctempdb_log_used_percent&timespan={$start_time}/{$end_time}",
      "URLSetting": {
        "requestType": "get"
      },
      "metrics": [

        {
          "mPath": "$.value[0].timeseries[*].data[-1].",
          "attribute": [{ "name": "average", "index": 1, "type": 1, "operation": "none", "defValue": 0 }],
          "operation": "none"
        },
        {
          "mPath": "$.value[1].timeseries[*].data[-1].",
          "attribute": [{ "name": "average", "index": 2, "type": 1, "operation": "none", "defValue": 0 }],
          "operation": "none"
        },
        {
          "mPath": "$.value[2].timeseries[*].data[-1].",
          "attribute": [{ "name": "average", "index": 3, "type": 1, "operation": "none", "defValue": 0 }],
          "operation": "none"
        },
        {
          "mPath": "$.value[3].timeseries[*].data[-1].",
          "attribute": [{ "name": "average", "index": 10, "type": 1, "operation": "none", "defValue": 0 }],
          "operation": "none"
        },
        {
          "mPath": "$.value[4].timeseries[*].data[-1].",
          "attribute": [{ "name": "average", "index": 20, "type": 1, "operation": "none", "defValue": 0 }],
          "operation": "none"
        },

        { "attribute": [{ "name": "value", "index": 4,  "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 5,  "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 6,  "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 7,  "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 8,  "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 9,  "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 11, "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 12, "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 13, "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 14, "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 15, "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 16, "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 17, "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 18, "type": 2, "defValue": 0 }] },
        { "attribute": [{ "name": "value", "index": 19, "type": 2, "defValue": 0 }] }

      ],
      "path": [
        { "isPartOfHierarchy": true, "query": "$.resourceregion" },
        {
          "isPartOfHierarchy": true,
          "query": "$.value[*].id",
          "splitChar": "/",
          "pickIndex": "4"
        },
        {
          "isPartOfHierarchy": true,
          "query": "$.value[0].id",
          "splitChar": "/",
          "pickIndex": "8"
        },
        {
          "isPartOfHierarchy": true,
          "query": "$.value[0].id",
          "splitChar": "/",
          "pickIndex": "10"
        }
      ]
    },


    {
      "URL": "$BaseURL/providers/microsoft.insights/metrics?api-version={$apiVersion}&metricnames=allocated_data_storage&timespan={$start_time}/{$end_time}",
      "URLSetting": {
        "requestType": "get"
      },
      "metrics": [
        {
          "mPath": "$.value[0].timeseries[*].data[-1].",
          "attribute": [{ "name": "average", "index": 21, "type": 1, "operation": "none", "defValue": 0 }],
          "operation": "none"
        }
      ],
      "path": [
        { "isPartOfHierarchy": true, "query": "$.resourceregion" },
        {
          "isPartOfHierarchy": true,
          "query": "$.value[0].id",
          "splitChar": "/",
          "pickIndex": "4"
        },
        {
          "isPartOfHierarchy": true,
          "query": "$.value[0].id",
          "splitChar": "/",
          "pickIndex": "8"
        },
        {
          "isPartOfHierarchy": true,
          "query": "$.value[0].id",
          "splitChar": "/",
          "pickIndex": "10"
        }
      ]
    }
  ]
}
