Grafana Zabbix Plugin
Video Lecture
Description
Grafana is good for monitoring time series data, and so is Zabbix,
Grafana is another option for viewing Zabbix Data, and data from many other data sources.
In this lecture, I will install Grafana on the same server as my Zabbix Server.
sudo apt-get install -y libfontconfig1
wget https://dl.grafana.com/oss/release/grafana_7.0.5_amd64.deb
sudo dpkg -i grafana_7.0.5_amd64.deb
Then start the service
sudo service grafana-server start
Your Grafana server will be hosted at
http://[your zabbix server ip or domain name]:3000
Default login is
username : admin
password : admin
I add a MySQL data source and I also need to add a specific user which has read only access to the zabbix database.
mysql
CREATE USER 'grafana'@'localhost' IDENTIFIED BY 'password';
GRANT SELECT ON zabbix.* TO 'grafana'@'localhost';
FLUSH PRIVILEGES;
QUIT;
I then need to add a zabbix datasource plugin,
grafana-cli plugins install alexanderzobnin-zabbix-app
Since Grafana v7, unsigned plugins won't be visible unless you explicitly allow them in the Grafana.ini
file.
Open /etc/grafana/grafana.ini
, and uncomment the line
;allow_loading_unsigned_plugins
and change to
allow_loading_unsigned_plugins = alexanderzobnin-zabbix-datasource
And then restart the grafana server
sudo service grafana-server restart
When configuring the Zabbix plugin, your API URL will be similar to this below.
https://[your zabbix server ip or domain name]/zabbix/api_jsonrpc.php
Also select the option for direct db access, and choose the MySQL data source you created a minute ago.
Warning
Since Grafana v7, unsigned plugins won't be visible unless you explicitly allow them in the Grafana.ini
file
Open /etc/grafana/grafana.ini
, uncomment the
;allow_loading_unsigned_plugins
and change it to
allow_loading_unsigned_plugins = alexanderzobnin-zabbix-datasource
And then restart the grafana server
sudo service grafana-server restart
Uninstall Grafana
If you are serious about using Grafana long term, then I suggest installing it on a separate server, rather than on the Zabbix server.
To uninstall Grafana,
sudo dpkg -r grafana
Grafana Course
If you want to try a more detailed course on Grafana, then you can visit my Grafana tutorials.