Suggest any exporter which exports results of KQL query from azure resource to promethues

27 views
Skip to first unread message

Venkatraman Natarajan

unread,
Aug 1, 2024, 5:38:55 AM8/1/24
to Prometheus Users
Hi Team,

I have application insights which I am able to query using KQL and show the result in Azure.

I need to store the queried result in prometheus database. 

Then using promQL I need to display it in grafana.

https://github.com/webdevops/azure-metrics-exporter - I have tried this one; it shows only metrics not able to query using KQL. 

https://github.com/webdevops/azure-loganalytics-exporter - This one only queries log analytics workspace not other resources.

https://github.com/RobustPerception/azure_metrics_exporter - This one not having dimension support.

Could you please help me with this? 

Thanks,
Venkatraman N

Brian Candler

unread,
Aug 1, 2024, 5:49:55 AM8/1/24
to Prometheus Users
At worst, you can use a cronjob script to perform your KQL query periodically, write its results to a file in prometheus text-based exposition format, then pick it up using node_exporter textfile collector (or even just serve it as a static HTTP web page and have prometheus scrape it directly)

Conall O'Brien

unread,
Aug 4, 2024, 5:08:26 PM8/4/24
to Venkatraman Natarajan, Prometheus Users
Do you intend to use the PromQL data for anything other than Grafana? If not, issuing the KQL queries directly from Grafana would be simpler than all this transcoding.


Grafana (self hosted) and Grafana Cloud can use a plugin for KQL queries. See https://grafana.com/grafana/plugins/grafana-azure-data-explorer-datasource/ for more details. IIRC, Azure Managed Grafana supports graphs using KQL without needing the additional plugin. See https://learn.microsoft.com/en-us/azure/data-explorer/grafana?tabs=azure-managed-grafana for ore specifics about Azure Managed Grafana.

--

Conall O'Brien

Venkatraman Natarajan

unread,
Aug 5, 2024, 10:33:15 AM8/5/24
to Conall O'Brien, Prometheus Users
Hi Everyone, 

Thank you for your suggestions. 

I have configured the below exporter to get the data using KQL from log analytics workspaces.

https://github.com/webdevops/azure-loganalytics-exporter - This one only queries log analytics workspace not other resources.

It works fine as expected. 

@con...@taku.iehttps://grafana.com/grafana/plugins/grafana-azure-data-explorer-datasource/ - I have used this plugin to query the data from grafana and show the result. It directly queries from azure monitor/log analytics workspace it will have only certain time data based on retention period.  

Our requirement is to store the data for more than 1 year. Azure monitor kql, metrics will show data only for the last 90 days. So, we need to export the data and store it in prometheus. 

So, I am trying here for long term storage as prometheus. 

We have another requirement to fetch server requests for Application insights using Azure monitor. 

I have tried the below exporters it is showing different values instead of actual server requests in application insights.   

https://github.com/RobustPerception/azure_metrics_exporter

https://github.com/webdevops/azure-metrics-exporter

Could you please suggest any other methods to export metrics from an azure monitor with dimension support? 

Thanks,
Venkatraman N
Reply all
Reply to author
Forward
0 new messages