Monitoring my devices with Zabbix and Grafana

A while ago I setup Zabbix on my vServer and my Pi3, which runs Homeassistant and Octoprint. Since then, I pretty much forgot about it. Now, that I replaced my Pi4 with a laptop it is time to step up my game.

My plan is to install Zabbix on the laptop, which acts as my mediaserver. Additionally, I want to create a nice dashboard with Grafana, so I have a nice dashboard to look at.

Installation on the laptop

The installation of the Zabbix agent went flawless. However, I remember the configuration aspect to be a bit troublesome. The good thing is, that my current setup with the Pi3 seems to be working fine, so I’ll have a look at it.

After copying and editing the configuration file, I started the agent on the laptop and added the configuration for a new host on the server. Reload the page and… Nope. The agent was not available. According to the logs, the agent is active and listening. Did I open the port? Yes. Did I select a template? No. Damn it. At least, now it seems to work.

Now that I have some basic data provided by Zabbix, let’s pause this for now and get started with Grafana

Grafana

Now that I have some data, it is time to visualize it with Grafana.

I create a new dashboard and start adding some information. I’ll create two dashboards for now:

  1. Current Device Status

  2. Historic Device Status

In the first overview, I want to be able to see current system utilization at a glance, while the second should be more indepth and give more historic data.

And here I meet my first issue. After adding a gauge for the current RAM usage, I try to add something similar for CPU usage. I can’t seem to find it. There are many stats for the CPU component, but not the total load. Weird.

After a bit of searching, I manage to find the item ‘CPU utilization’. However, it is not found with the item tag CPU.

Now for the network traffic. Each device has multiple interfaces. At least one wireguard and one eth interface. I select all values by hand (, hide the single queries) and add them up. Now I have a nice sum of bits sent for all devices. I need to do the same for all received bits. I guess there must be a faster way than all this clicking. I’d love to just copy a config file and edit the values. I’ll have to search for that later. I save the finished panels in my library, so I can reuse them without a lot of work.

This comes in very handy, since my next goal is to create another dashboard which shows timeseries. I manage to complete this without a hitch.

The bad thing: Both dashboards are still very ugly (BUT FUNCTIONAL!). I am content for now. More data and more style can still be added at a later day.