Skip to content

Zabbix in the Middle of Prometheus and Grafana

In this blog post, I will show you how to gather metrics from a OpenTelemetry interface from a Zabbix server and how to display Zabbix data in Grafana.

Why Should I do that?

First, you might wonder why should you even do that?

Dashboards capabilities of Zabbix are nice and evolving but is not as complete and customizable as Grafana can be. Thus, Grafana is still the best choice for interactive visualization.

Also, many applications provide metrics in open telemetry format out-of-the-box, so being able to get metrics into Zabbix server for computation and storage would be nice. It can also be preferred by those who do not like black boxes like Prometheus.

Finally, having all Zabbix data stored in, for my case, PostgreSQL with TimescaleDB offers great storage reductions. From my experience of Timescale on a Zabbix database, you can expect a compression rate of x10.

This implementation divides in two chapters:

  • First is for getting data from Prometheus node exporters to Zabbix.
  • Second is displaying Zabbix data in Grafana dashboard.

Node Exporter

Monitoring a node exporter is very easy. On the host, simply link “Linux by Prom” template and that’s it. Of course, node exporter must be up and running.

Questions about your own setup? A dbi services consultant can look at your case.

Talk to an expert (opens in a new tab)

Grafana

Plugin and Datasource

Before being able to use Zabbix as a datasource for Grafana, we must install and enable the associated plugin. Once it is installed, we can create the datasource of type Zabbix:

After a click on “Zabbix”, we are requested to add few parameters. Among these, we will provide:

  • URL to Zabbix API
  • Credentials which can be Username/Password or an API token

Be careful, as the prefilled username is admin with a small a whereas Admin is usually with a capital A.

For better query performance, the plugin can also query the database used by Zabbix directly (This is optional). For that, you must create another datasource to the type of database you are using. In my case, it is a PostgreSQL database:

Dashboard

Now, it is time to create a dashboard and use that newly created datasource:

Group, Host, Item tag and Item lists are automatically populated from Zabbix configuration.

An example of a dashboard showing idle CPU for both Zabbix server itself and another monitored host:

Let’s work together

Ready to operate at
the next level?

Tell us about your challenge. We’ll bring the depth, the expertise, and the Swiss precision.

Middleware Team

Middleware Team

Posts published under the Middleware Team account are collective contributions by the dbi services middleware and enterprise content management consultants. The practice covers ECM platforms such as OpenText Documentum, Alfresco, and M-Files, as well as application servers and integration technologies including WebLogic, JBoss, Tomcat, and the Elastic Stack, from architecture and deployment to operations under service level agreements.View Author posts

322 posts since February 2013

Most read in Application Server

The Application Server posts our readers open most: the all-time favourites, and what is trending right now.

Leave a Comment

Your email address will not be published. Required fields are marked *