In this blog, you will learn how you can use Azure with Grafana Monitoring. Grafana allows you to query, visualize, alert on, and understand your metrics no matter where they are stored. Create, explore, and share dashboards with your team and foster a data-driven culture.
Visualize → Fast and flexible visualizations with a multitude of options allow you to visualize your data any way you want.
Dynamic Dashboards → Create dynamic & reusable dashboards with template variables that appear as dropdowns at the top of the dashboard.
Explore Metrics → Explore your data through ad-hoc queries and dynamic drill-down. Split view and compare different time ranges, queries, and data sources side by side.
Explore Logs → Experience the magic of switching from metrics to logs with preserved label filters. Quickly search through all your logs or streaming them live.
Alerting → Visually define alert rules for your most important metrics. Grafana will continuously evaluate and send notifications to systems like Slack, PagerDuty, VictorOps, OpsGenie.
Mixed Data Sources → Mix different data sources in the same graph! You can specify a data source on a per-query basis. This works for even custom data sources.
Annotations → Annotate graphs with rich events from different data sources. Hover over events shows you the full event metadata and tags.
Ad-hoc Filters → Ad-hoc filters allow you to create new key/value filters on the fly, which are automatically applied to all queries that use that data source.
Azure Monitor Data Source For Grafana
Azure Monitor is the platform service that provides a single source for monitoring Azure resources. Application Insights is an extensible Application Performance Management (APM) service for web developers on multiple platforms and can be used to monitor your live web application — it will automatically detect performance anomalies.
The Azure Monitor Data Source plugin supports Azure Monitor, Azure Log Analytics and Application Insights metrics in Grafana.
Features
Support for all the Azure Monitor metrics
includes support for the latest API version that allows multi-dimensional filtering for the Storage and SQL metrics.
Automatic time grain mode which will group the metrics by the most appropriate time grain value depending on whether you have zoomed in to look at fine-grained metrics or zoomed out to look at an overview.
Application Insights metrics
Write raw log analytics queries, and select x-axis, y-axis, and grouped values manually.
Automatic time grain support
Support for Log Analytics (both for Azure Monitor and Application Insights)
You can combine metrics from both services in the same graph.
Install Grafana on macOS
Download and install
Before you begin, you must have Home-brew installed on your mac machine.
Login in with a user that has admin rights. This is needed to create data sources.
To make sure the plugin was installed, check the list of installed data sources. Click the Plugins item in the main menu. Both core data sources and installed data sources will appear.
Installing the Plugin Manually on an Existing Grafana
If the server where Grafana is installed has no access to the Grafana.com server, then the plugin can be downloaded and manually copied to the server.
Extract the zip file into the data/plugins subdirectory for Grafana.
Restart the Grafana server
To make sure the plugin was installed, check the list of installed data sources. Click the Plugins item in the main menu. Both core data sources and installed data sources will appear.
Configure the data source
The plugin can access metrics from both the Azure Monitor service and the Application Insights API. You can configure access to one service or both services.
Accessed from the Grafana main menu, newly installed data sources can be added immediately within the Data Sources section. Next, click the “Add data source” button in the upper right. The data source will be available for selection in the Type select box.
2. Select Azure Monitor from the Type dropdown:
3. In the name field, fill in a name for the data source. It can be anything. Some suggestions are Azure Monitor or App Insights.
4. If you are using Azure Monitor, then you need 4 pieces of information from the Azure portal (see link above for detailed instructions):
Tenant Id (Azure Active Directory -> Properties -> Directory ID)
Client Id (Azure Active Directory -> App Registrations -> Choose your app -> Application ID)
Client Secret ( Azure Active Directory -> App Registrations -> Choose your app -> Keys)
5. Paste these four items into the fields in the Azure Monitor API Details section:
6. If you are also using the Azure Log Analytics service, then you need to specify these two config values (or you can reuse the Client Id and Secret from the previous step).
Client Id (Azure Active Directory -> App Registrations -> Choose your app -> Application ID)
Client Secret ( Azure Active Directory -> App Registrations -> Choose your app -> Keys -> Create a key -> Use client secret)
7. If you are are using Application Insights, then you need two pieces of information from the Azure Portal (see link above for detailed instructions):
Application ID
API Key
8. Paste these two items into the appropriate fields in the Application Insights API Details section:
9. Test that the configuration details are correct by clicking on the “Save & Test” button:
Alternatively on step 4 if creating a new Azure Active Directory App, use the Azure CLI:
az ad sp create-for-rbac -n "http://localhost:3000"
Once after all the details are passed on , we need to click on Save & Test and we must get this output below :
Importing a Dashboard from the Grafana Dashboard :
Click on the below website and then choose the Dashboards and we can choose any template that we wanted to do so .
AZ-900: Microsoft Azure Fundamentals Tutorial provides foundational level knowledge on cloud concepts; core Azure services; security, privacy, compliance, and trust; and Azure pricing and support.