How To Configure Grafana to Plot Beautiful Graphs from Zabbix on CentOS 7
How To Configure Grafana to Plot Beautiful Graphs from Zabbix on CentOS 7
Zabbix is an open-source monitoring software tool for diverse IT components, including networks, servers, virtual machines and cloud services. Zabbix provides monitoring metrics, among others network utilization, CPU load and disk space consumption. But the built-in tools for visualization are not much user friendly.Grafana is a good alternative to Zabbix’s dashboards. It lets you create graphs and dashboards based on data from zabbix and it specializes in the display and analysis of this data. It is lightweight, easy to install, and it looks stunning.
- Installing Grafana
We need to install grafana. Grafana can be installed in multiple ways. You can use it in Standalone server or in the same server as in zabbix or as a docker image. For how to install the grafana please check here.
- Zabbix Plugin for Grafana
We can extend grafana's capability by using plugins. For this task we will install Zabbix Plugin for Grafana, which includes a Zabbix data source, a triggers panel.
The easiest way to install plugins is by using the CLI tool grafana-cli which is bundled with Grafana. Run the following command to install the Zabbix App plugin:
root@grafanaserver:/# grafana-cli plugins install alexanderzobnin-zabbix-app
installing alexanderzobnin-zabbix-app @ 3.10.1
from url: https://grafana.com/api/plugins/alexanderzobnin-zabbix-app/versions/3.10.1/download
into: /var/lib/grafana/plugins
✔ Installed alexanderzobnin-zabbix-app successfully
from url: https://grafana.com/api/plugins/alexanderzobnin-zabbix-app/versions/3.10.1/download
into: /var/lib/grafana/plugins
✔ Installed alexanderzobnin-zabbix-app successfully
Restart grafana after installing plugins . <service grafana-server restart>
root@grafanaserver:/# systemctl restart grafana-server
root@grafanaserver:/#
root@grafanaserver:/#
Configuring the Zabbix Plugin
Log in to the Grafana web interface by navigating to the address http://your_grafana_server_ip_address:3000. (port number 3000 is the default Grafana port). The default login credentials are admin/admin.Once you Login to the grafana the Home Page will be displayed. There you can Check the Zabbix app as highlighted in the Figure Below.
In the Left hand side goto Configuration and select Datasources. 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.
- 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.
- Select Access As Browser.
- 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.
You can leave the other options at their default values.
Click the Save&Test button to test and save the configuration. You’ll see a success message if the test Pass through.
No comments