grafana database high availability

Step To Configure Centralised Database For Grafana

Step To Configure Centralised Database is the core of your company. you always need to make a backup server for the high availability of the database. If we make a database on the same server where an application is installed and running. We can configure a centralized grafana high availability database on Linux. so

Check Out: Active Directory Integration With Grafana Version 5.x.x

It can be very dangerous for both database and application as if the server failed, You do not have any way to recover it until you have some backup of that server. so

The purpose of connecting Grafana application it to the centralized database as it can improve the performance of servers and data always be available for users. so

Our Scenario Requirement

  1. Centralized database server IP 10.1.11.10
  2. Grafana Testing Application IP 10.1.11.11
  3. Grafana Production Application IP 10.1.11.12

Configuration Database:

Login to your database server mysql –u root -p

Create a USER and grant Permission on database

so CREATE USER ‘username’@’10.1.11.10’ IDENTIFIED BY ‘password’;

  1. Grants Permission to access the database  
GRANT ALL PRIVILEGES ON database_name.* TO ‘username’@’10.1.11.11’ IDENTIFIED BY ‘password’;

And

GRANT ALL PRIVILEGES ON database_name.* TO ‘username’@’10.1.11.12’ IDENTIFIED BY ‘password’;

In Case, you have two Grafana Server.

Check Out: Step To Configure HA (High Availability) For Grafana

3. FLUSH PRIVILEGES;

Configure Grafana to use this database

Go to the Grafana file location /etc/grafana/grafana.ini

Edit the section of [database]

Put these same settings on both servers

Type = MySQL
host = 10.1.11.10:3306
Name = database_name
User = username
Password = password

Save the file

  1. Restart the service
systemctl restart grafana-server

Check Out: How To Change Grafana Default Port In Linux

Now the last step is to check database stored on a centralised server. so

Login to your database server using mysql –u root –p so

Run the following command so

use database_name;
show tables;

It will show you what is stored in the database. so

That’s it. grafana database high availability centralized configure

Rate this article

Leave a Reply

avatar
  Subscribe  
Notify of