webdevops / azure-loganalytics-exporter

Prometheus exporter for Azure LogAnaylytics (Kusto queries)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no azurerm_api_ratelimit metric in /metrics

manvitha9347 opened this issue · comments

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?

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.

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

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.