Do I need to read PART 1?
If you have not read the PART 1 and you need to integrate Zabbix & Grafana, I Highly recommend you to read PART 1 before reading PART 2. But if you want to just install Grafana for your Data Visualization without Zabbix you can continue reading.
Grafana Installation Guide
We will user the machine which we were using for our Zabbix server in PART 1. So it's Ubuntu Server 18.04 (bionic) and now it's running Zabbix on it. In this section we will install Grafana and Zabbix-App plugin to be ready to Visualize it on our Grafana.
How to Install Grafana 6.25 and Zabbix-APP plugin
Downloading DEB package: To do that, You must execute this command
$ wget https://dl.grafana.com/oss/release/grafana_6.2.5_amd64.deb
Installing prerequiesites: We need to install adduser and libfontconfig1 and then install the downloaded DEB package
$ sudo apt-get install -y adduser libfontconfig1 $ sudo dpkg -i grafana_6.2.5_amd64.deb
Start Service: We need to start grafana-server service and also we need to start it at boot time. So, Execute these commands
$ sudo service grafana-server start $ sudo update-rc.d grafana-server defaults
That's it: Now you can open Grafana frontend web application by browsing http://YOUR-SERVER-IP-or-FQDN:3000
When you open http://YOUR-SERVER-IP-or-FQDN:3000 address you must login using the default credentials and after you login it will immediately show change password page.
Installing Zabbix-APP plugin as a datasource: Grafana supports multiple data sources like InfluxDB, ElasticSearch, Graphite ,... but we are interested in using Zabbix-APP as an datasource to Visulize the items that our Zabbix Servers gathered from different sources. You can find it here https://grafana.com/grafana/plugins/alexanderzobnin-zabbix-app. To install this plugin we can use Grafana CLI. Run the further command to do that.
$ sudo -u grafana grafana-cli plugins install alexanderzobnin-zabbix-app
After that, We need to restart our Grafana Server service to make Zabbix App plugin available.
$ sudo service grafana-server restart
Now get back to your browser and enable this plugin using the Enable now link. Here is the screenshot:
Then click on Enable button on the next page
Adding Zabbix Data Source: To add Zabbix as a Data source for Grafana, get back to Grafana home by clicking on the top left Icon and then click on Add data source like the screen shot
In this page select Zabbix from the list
Since we are on a test server I will use Admin username and password which we mentioned in PART 1 to connect to Zabbix Server but in production define a READ-ONLY user on your Zabbix define here
As shown in screenshot use need to fill these fields and click on Save & Test to save this data source.
Name: Name of your Datasource
URL: Your Zabbix URL: It must be in this format: http://YOUR-SERVER-IP-ADDRESS/zabbix/api_jsonrpc.php
Username: Zabbix User
Password: Zabbix User's password