Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to specify custom time range for metrics query #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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