Search code examples
azuregrafanaazure-application-insights

Application Insights return empty charts on Grafana


I'm trying to display azure application insights on a grafana dashboard, the application insights are enabled for a web service on the Azure ML studio but end up with empty charts for all the available metrics. Can you please tell me where I'm doing it wrong or if I'm missing something? Thank you.


Solution

  • Application Insights is an Application Performance Management service from Azure for web developers on multiple platforms and it can be used to monitor your web application. You would get the charts in Grafana if you are following steps mentioned below.

    1. In Grafana, use the Azure Monitor Data Source plugin which supports Azure Monitor, Azure Log Analytics and Application Insights metrics. But remember this plugin requires Grafana 4.5.0 or newer for Application Insights. You can install the plugin in after updating your Grafana in CLI with the following command.

      grafana-cli plugins install grafana-azure-monitor-datasource
      

      You can also set up Grafana on Azure through the Azure Marketplace.

    2. The plugin can access metrics from both the Azure Monitor service and the Application Insights API. But you would need to configure access to the services. If you are using Application Insights, then you need two pieces of information from the Azure Portal which are the Application ID and an API key. Check this Application Insights API QuickStart for more information.

      enter image description here

    3. Write analytic queries for the Application Insights. When you set service type to "Application Insights", the menu icon to the right adds another option, "Toggle Edit Mode". Once clicked, it gives you a full text area in which to write log analytics queries. Check this Writing Analytics Queries For Application Insights section of the Grafana document for more information.

      enter image description here

      enter image description here

    The above mentioned procedure will help you get the proper charts in the Grafana. I would also suggest to read this Monitor your Azure services in Grafana document from Microsoft for more information.