How to install and configure Grafana to have graphs from Zabbix ?

Grafana is a good alternative to Zabbix’s dashboards. It lets you create graphs and dashboards based on data from various monitoring systems, and it specializes in the display and analysis of this data. It is lightweight, easy to install, and it looks beautiful.

Prerequisite

  • 1 Zabbix Server Up/Running with hosts monitoring
  • 1 Server Ubuntu/CentOS

Step 1 — Installing Grafana

Ubuntu/Debian

Enable and start service :

Red Hat/CentOS

Enable and start service :

Step 2 — Installing Nginx

Ubuntu/Debian

Red Hat/CentOS

To add the CentOS 7 EPEL repository, open terminal and use the following command:

Enable and start service :

 

Step 3 — Setting Up the Reverse Proxy

Locate the following block:

Delete the existing try_files line in this location block and replace it with the following contents, which all begin with proxy_.

Once you’re done, save the file and close your text editor. Now, if you need to create symlink and test your configuration.

Finally, connect to the url : http://grafana.domain.local or your ip.

  • Default Login
    • username : admin
    • password : admin

Step 4 — Installing the Zabbix Plugin for Grafana

Now, we will install a zabbix plugin for Grafana, the plugin is developped by Alexander Zobnin.

The installation is finish, please restart grafana-server

Step 5 — Configuring the Zabbix Plugin

First, you must activate the plugin, in the web interface, go to the setting and plugin.

Search Zabbix and then click on the Zabbix app and enable it by pressing the Enable button.:

 

Now you can add a new data source. Select the Grafana logo again and navigate to Data sources. Then click the Add data source button. You will see the configuration page for the data source:

 

Configure the data source as follows:

  • Enter a name for this new data source in the Name field.
  • Check the Default option so this data source will be preselected in new panels you create.
  • Select Zabbix from the Type drop down list.
  • Fill in the Url field with the full path to the Zabbix API, which will be http://your_zabbix_server_ip_address/zabbix/api_jsonrpc.php.
  • Fill in the Username and Password fields with the username and password for Zabbix. The default username is admin and the default password is zabbix.
  • Enable the Trends option; it will increase Grafana’s performance when displaying long time periods.
  • Check Skip TLS Verification (Insecure) if you didn’t configure SSL.

You can leave the other options at their default values.

Click the Add button to test and save the configuration. You’ll see a success message that looks like the following:

 

Step 6 — Configure Zabbix Dashboard

Go to the default dahsboard of Zabbix Plugin “Zabbix Server Dashboard

Now, edit all graphs, single stats. It is necessary to change the server and the group according to your configuration

Example :

Conclusion

You installed grafana with Zabbix as source, now it’s up to you to build your graphs

Leave a reply:

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Site Footer