Open nohupped opened 3 weeks ago
Managed to figure this out. It was an azure role assignment's scope issue for the managed identity. I understand that the frontend is supposed to give a status 200 if the cache is empty, but is the exporter backend expected to not throw any errors when it doesn't have the right scope/role when querying metrics?
Hi,
azure-metrics-exporter v24.2.0 Debian 12 x64 Go v1.23.0
Please help. I need get metrics from Virtual Machine Insights and KV, but I get zero results.
{"Logger":{"Debug":true,"Development":false,"Json":false},"Azure":{"Environment":"AZUREPUBLICCLOUD","AdResourceUrl":null,"ServiceDiscovery":{"CacheDuration":1800000000000},"ResourceTags":["owner"]},"Metrics":{"Template":"{name}","Help":"Azure monitor insight metric"},"Prober":{"ConcurrencySubscription":5,"ConcurrencySubscriptionResource":10,"Cache":false},"Server":{"Bind":":8080","ReadTimeout":5000000000,"WriteTimeout":10000000000}}
found 1 Azure Subscriptions
RG tested permissions:
Is there something missing? I don't see any errors in debug
@antoniovalenzuela I had your same issue where it was giving zero metrics with no error. I had to assign the Monitoring Reader
role assignment to both the Resource Group
and the Subscription
from Azure managed identity for this to work. It will look something like this from the UI.
For terraform, I used
data "azurerm_resource_group" "this" {
name = var.resource_group_name
}
data "azurerm_subscription" "this" {
}
to get both these resource to assign to them.
Thanks for the information.
Finally I tested with Prometheus Windows Exporter, I can replace Insights with Grafana in both metrics and alerts.
I could migrate VMs to another cloud without being tied to the Azure architecture.
Hi, I am trying to get azure metrics exporter running in our kubernetes cluster with workload identity. I created a local repository from helm using
and I have a federated identity created with the following permissions.
Since I was doubtful about the permission scope, I've added the Monitoring reader role as well from our azure portal just to be sure.
I have the pod up and running and I have the following from my pod logs
From the logs, it appears good and I could see its own metrics at the :8080/metrics endpoint.
When I am trying to use the /query endpoint, I get a status 200 but with empty metrics for any metrics I am trying to discover.
For eg: I am trying to get one metric
connections_succeeded
fromMicrosoft.DBforPostgreSQL/flexibleServers
using my subscription ID from both/probe/metrics
and/probe/metrics/list
and both gives me zero metrics but with a status 200. However, when I was checking the actual monitor from within the azure postgres database, I could see connections_succeeded isn't empty and has values. I didn't see any errors in the pod logs either. Attaching a screenshot of what I see in /query endpoint.Kindly advise.
Thanks.