Skip to content

Conversation

@ludydoo
Copy link

@ludydoo ludydoo commented Mar 22, 2021

Stumbled on a problem trying to get a storageaccount UsedCapacity.
Seems like Azure doesn't allow to query this metric using the default range (1minute), but needs a bigger range (>1h)
This pull request adds the range_seconds and offset_seconds, which are used to get the start/end time for the metrics query.

resource_tags:
  - resource_tag_name: "monitoring"
    resource_tag_value: "prometheus"
    resource_types:
      - "Microsoft.Storage/storageAccounts"
    metric_namespace: "microsoft.storage/storageaccounts"
    metrics:
      - name: "UsedCapacity"
    range_seconds: 21600
    offset_seconds: 180
    aggregations:
      - "Average"

@techcubs
Copy link

Hi,
when can we expect this to be implemented please?
Regards,

@SlevinBE
Copy link

I tested this PR in my setup and it does indeed solve the issue. Thanks! 👍
Probably a good idea to add some instructions on how to use these two new options to the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants