# Metricbeat azure module - Simultaneously fetch multi-dimensional metric values

**URL:** <https://discuss.elastic.co/t/metricbeat-azure-module-simultaneously-fetch-multi-dimensional-metric-values/280326>\
**Category:** Beats\
**Tags:** beats-module, metricbeat\
**Created:** [August 3, 2021, 2:03pm UTC](https://discuss.elastic.co/t/metricbeat-azure-module-simultaneously-fetch-multi-dimensional-metric-values/280326 "2021-08-03T14:03:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ag\_joeb](https://avatars.discourse-cdn.com/v4/letter/a/4491bb/32.png) [@ag\_joeb](https://discuss.elastic.co/u/ag_joeb)\
**Post date:** [August 3, 2021, 2:03pm UTC](https://discuss.elastic.co/t/metricbeat-azure-module-simultaneously-fetch-multi-dimensional-metric-values/280326/1 "2021-08-03T14:03:30Z")

</div>

I'm trying to fetch Cosmos DB metrics from azure using metricbeat's azure module. An example:

```auto
- module: azure
  metricsets:
  - monitor
  enabled: true
  period: 30s
  client_id: '<client_id>'
  client_secret: '<client_secret>'
  tenant_id: '<tenant_id>>'
  subscription_id: '<subscription_id>'
# refresh_list_interval: 60s
  resources:
   - resource_id: '/subscriptions/<subscription_id>/resourceGroups/<resource_group>/providers/Microsoft.DocumentDB/databaseAccounts/<DB_instance_name>'
     metrics:
       - name: ['TotalRequests']
         namespace: 'Microsoft.DocumentDB/databaseAccounts'
         dimensions:
         - name: "StatusCode"
           value: "*"

```

At the time of request, the above metricbeat config seems to fetch the `TotalRequests` of a randomly selected `StatusCode` ONLY, whilst I'm looking to fetch the count of the `TotalRequests` for all `StatusCodes`.

An example of the documents in the index would look something like the below (irrelevant data is removed from the below):

```auto
"@timestamp" : "2021-08-02T07:31:00.000Z"
"azure": {
  "dimensions" : {
      "status_code" : "449"
  },
  "metrics" : {
      "total_requests" : {
          "count" : 294
      }
  }
}

"@timestamp" : "2021-08-02T07:32:00.000Z"
"azure": {
  "dimensions" : {
    "status_code" : "201"
  },
  "metrics" : {
      "total_requests" : {
          "count" : 1497
      }
  }
}

"@timestamp" : "2021-08-02T07:33:00.000Z"
"azure": {
  "dimensions" : {
    "status_code" : "200"
  },
  "metrics" : {
      "total_requests" : {
          "count" : 16734
      }
  }
}

```

Whilst I'm looking to achieve something on the following lines:

```auto
"@timestamp" : "2021-08-02T07:33:00.000Z"
"azure": {
  status_code" : [
      {
          "name": "449",
          "total_requests": {
              "count": 294
          }
      },
      {
          "name": "201",
          "total_requests": {
              "count": 1794
          }
      },
          {
          "name": "200",
          "total_requests": {
              "count": 16734
          }
      }
  ]
}

```

Can anyone shed some light on fetching all azure metric dimensions simultaneously?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 31, 2021, 2:04pm UTC](https://discuss.elastic.co/t/metricbeat-azure-module-simultaneously-fetch-multi-dimensional-metric-values/280326/2 "2021-08-31T14:04:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
