-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
az monitor metrics list
returns null for future times
#6196
Comments
What I'm most puzzled about is that if I use az monitor metrics list --resource /subscriptions/<id>/resourceGroups/POC-JACK-BS-METRICS/providers/Microsoft.Compute/virtualMachines/poc-jack-bs-metrics --metric 'CPU Credits Consumed,CPU Credits Remaining' --interval PT1M --start-time $(date -u +"%Y-%m-%dT%H:%M:%SZ" --date='2 minutes ago') --end-time $(date -u +"%Y-%m-%dT%H:%M:%SZ" --date='1 minute ago') seems to work. 🤔 |
Just worked it out, it's timezone related, the Ruby script I'm using isn't taking the timezone into account, To be honest the output from this command should probably error if times in the future are queried? |
az monitor metrics list
returns null for any recent timeaz monitor metrics list
returns null for future times
It is arguable whether this should fail if a future time is given. We will help the user diagnose issues by showing the OData filter supplied when the user supplied |
Out of interest, what's the argument for it not returning an error for a future time? It seems pretty logical to me to throw an error to the user if they're querying metrics for something that hasn't happened yet (as opposed to a time that's happened but has no metrics). |
Hi there,
The text was updated successfully, but these errors were encountered: