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

no azurerm_api_ratelimit metric in /metrics #4

Open
manvitha9347 opened this issue Jul 7, 2022 · 3 comments
Open

no azurerm_api_ratelimit metric in /metrics #4

manvitha9347 opened this issue Jul 7, 2022 · 3 comments

Comments

@manvitha9347
Copy link

Hi @mblaschke
i am not able to see azurerm_api_ratelimit metric in /metrics endpoint
so i set my env var
METRIC_AZURERM_API_RATELIMIT_AUTORESET true
METRIC_AZURERM_API_RATELIMIT_ENABLE true
still i am not able to see that
is there any specific reason for that?

@mblaschke
Copy link
Member

These metrics are only published once and cleaned up after /metrics url was access.

reason for this is that these metrics are only valid for a short period of time. 5 minutes later the values would be not valid anymore (eg ratelimit).

azure-loganalytics-exporter doesn't access the Azure RM API that often as it's cached so you might not see these metrics that often.

If you disable autoreset the metrics should stay and are not cleaned up but be aware that this can be misleading.

@manvitha9347
Copy link
Author

Hi @mblaschke
Thankyou for the reply
So the first step I tried was with disabling autoreset.As hitting /metrics endpoint often did not give any data for rate limit,i just tried setting autoreset enabled.
But either way,hitting it frequently did not give the data

@mblaschke
Copy link
Member

There is only a ratelimit detection for Azure ResoruceManager API, not one for Azure Monitor/Insights API.
You will only see ratelimits if exporter is using ServiceDiscovery to find workspaces in eg subscriptions every 30 minutes (see AZURE_SERVICEDISCOVERY_CACHE).

If you pass workspaces directly it will not use any ServiceDiscovery and so no API calls are trigged (and so no ratelimits are detected)

If Azure publishes the workspace ratelimits via HTTP header i will add them.

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

No branches or pull requests

2 participants