/zabbix_zfs-on-linux

zabbix template and user parameters to monitor zfs on linux

MIT LicenseMIT

Info

This Repo is a fork of mpawlik/zabbix_zfs-on-linux which is a fork of Cosium/zabbix_zfs-on-linux which was originally made by pbergdolt.

Most importatly it is a passive Template instead of active and fixes some small issues like incorrect IO reporting.

It works on Zabbix 6.0, I didn't try other versions.

Monitor ZFS on Linux on Zabbix

This template will give you screens and graphs for memory usage, zpool usage and performance, dataset usage, etc. It includes triggers for low disk space (customizable via Zabbix own macros), disks errors, etc.

Example of graphs:

  • Arc memory usage and hit rate: arc1
  • Complete breakdown of META and DATA usage: arc2
  • Dataset usage, with available space, and breakdown of used space with directly used space, space used by snapshots and space used by children: dataset
  • Zpool IO throughput: throughput

Supported OS and ZoL version

Any Linux variant should work, tested version by myself include:

  • Debian 12

About the ZoL version, this template is intended to be used by ZoL version 0.7.0 or superior but still works on the 0.6.x branch.

Installation on Zabbix server

Import the template

Import the template that is in the "template" directory of this repository or download it directly with this link: template

Installation on the server you want to monitor

Prerequisites

The server needs to have some very basic tools to run the user parameters:

  • awk
  • cat
  • grep
  • sed
  • tail

Usually, they are already installed and you don't have to install them.

Add the userparameters file on the servers you want to monitor

On recent ZFS on Linux versions (eg version 0.7.0+), you don't need sudo to run zpool list or zfs list so just install the file ZoL_without_sudo.conf and you are done.

If you don't know where your "userparameters" directory is, this is usually the /etc/zabbix/zabbix_agentd.d folder. If in doubt, just look at your zabbix_agentd.conf file for the line begining by Include=, it will show where it is.

Restart zabbix agent

Once you have added the template, restart zabbix-agent so that it will load the new userparameters.

Customization of alert level by server

This template includes macros to define when the "low disk spaces" type triggers will fire.

By default, you will find them on the macro page of this template: macros

If you change them here, they will apply to every hosts linked to this template, which may not be such a good idea. Prefer to change the macros on specific servers if needed.

You can see how the macros are used by looking at the discovery rules, then "Trigger prototypes": macros