As more and more organizations run their business-critical applications on containers using Azure, there are new challenges in monitoring and managing them. Of course, there is the Azure dashboard, but with elaborate set-ups and such, IT teams feel the need for a more intuitive dashboard to monitor and track Azure services.
The answer, Grafana.
Grafana is an open-source dashboard and graph editor for Graphite, Elasticsearch, OpenTSDB, Prometheus, and InfluxDB. It is a powerful visualization application that deals effectively with large-scale measurement data and time-series data.
As compared to other dashboards, especially the native Azure dashboard, Grafana offers a wider variety of visualization options (graphs, heatmaps, tables, and more) and can collect and collate data from multiple sources. It is designed for evaluating metrics such as system CPU, memory, disk, and I/O utilization.
A Grafana dashboard will help you understand, analyze, monitor, and explore your data with flexible and fast visualization tools.
In this article we will look at using Azure Database for MySQL and Grafana to monitor Azure services
In your Azure subscription, your account must have “Microsoft.Authorization/*/Write” access to assign and AD app to a role. This action is granted through “Owner” role or “User Access Administrator” role. “Contributor” role will not have the required permissions.
1. Create an Azure database for MySQL server from
2. Select the resource group, provide Server name, admin username, password, confirm password. Take a note of the password; it is used several times throughout the set-up.
3. To select compute and storage,
a. There are three pricing tiers, (choose basic)
b. Select the appropriate sizes.
For basic compute and storage,
The maximum vcore is 2, and Storage is 1024 GB. Choose as per your needs.
4. Then click Review+Create
5. Once the Azure database for MYSQL server is deployed, go to connection security and do the following changes,
6. Do the following in the SQL server by connecting to it using the Server admin login name and password in SQL workbench. Create a new query tab. (You can use any tool to connect MySQL)
7. Run the following commands in the query tab,
8. Now the SQL server-side configurations are over. We need to provide the inputs of SQL server configuration to docker containers running Grafana.
9. Login to the VM running Grafana using appropriate SSH credentials (password or access keys).
10. Note the following values and save them as environment variables as an environment list.
Type = mysql
Host = <servername>:3306 (mysql server name created earlier)
Name = grafana (DB name given in the earlier steps and given access)
User = <Server admin login name>
Password = <server login password>
11. Save the changes mentioned above as a list. As shown,
1. Login to the server using appropriate credentials,
2. Get updates using, sudo apt-get update
3. Install docker using the command, sudo apt install docker.io
4. Enable and start docker,
5. Verify the installation using the command,
6. Now login as root using the command,
7. Pull Grafana image; this needs an Internet connection as this will download the image from a public hub of docker
8. Run the image with saved environment variables,
9. verify the container installation using “docker ps” command
10. The next step is to install the plugins for Grafana, which will be used in setting up the dashboard. We need to login to the container created previously to install these plugins.
11. Now create a shell inside the container using,
12. The result will be as shown,
13. By default, in Grafana dashboard there’ll be limited number of panel plugins, to use more visualization we can manually install plugins. Now copy the plugin installation commands listed below and run them one by one or everything at once.
14. Once the plugins are installed,
15. Now exit the container, command: exit
16. Now restart the container using,
Applying the service principal to Grafana,
CloudIQ is a leading Cloud Consulting and Solutions firm that helps businesses solve today’s problems and plan the enterprise of tomorrow by integrating intelligent cloud solutions. We help you leverage the technologies that make your people more productive, your infrastructure more intelligent, and your business more profitable.
626 120th Ave NE, B102, Bellevue,
Chennai One IT SEZ,
Module No:5-C, Phase ll, 2nd Floor, North Block, Pallavaram-Thoraipakkam 200 ft road, Thoraipakkam, Chennai – 600097
Get in touch
Please contact us using the form below