Create Zabbix Dashboard

Video Lecture

Create Zabbix Dashboard Create Zabbix Dashboard Create Zabbix Dashboard

Description

First Create a MySQL Data Source that will connect directly to the Zabbix Servers MySQL Database.

SSH onto the Zabbix Server,

Create a user in MySQL, with read only access, that the Grafana MySQL data source will use to connect with.

mysql
> CREATE USER 'grafana'@'YOUR GRAFANA SERVER IP ADDRESS' IDENTIFIED BY 'password';

> GRANT SELECT ON zabbix.* TO 'grafana'@'YOUR GRAFANA SERVER IP ADDRESS';

> FLUSH PRIVILEGES;

> QUIT;

Also allow remote connections on MySQL

MySQL 5.x

sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

MySQL 8.x and above

sudo nano /etc/mysql/my.cnf

Change or Add the bind address value

...
[mysqld]
...
bind-address    = 0.0.0.0

Restart MySQL

Restart the MySQL and check the status.

sudo service mysql restart
sudo service mysql status

Continue on the Grafana Server

I then finish and save the MySQL data source for Zabbix.

Now it's time to install the Zabbix Data Source plugin that will connect to the Zabbix API, and also use the new MySQL data source we just created.

I SSH onto the Grafana Server and add a Zabbix Data Source plugin using the CLI

grafana-cli plugins install alexanderzobnin-zabbix-app

And then restart the Grafana server

sudo service grafana-server restart

I then use the Grafana UI to enable the Zabbix Data Soure Plugin, and then configure it.

The required API URL will be,

https://[your zabbix server ip or domain name]/zabbix/api_jsonrpc.php

Also select the 'Direct DB Access' to be the new MySQL Datasource you just created.

Save and Continue

Zabbix Course

If you want to try a more detailed course on Zabbix, then you can visit my Zabbix tutorials.