[SOLVED] Zabbix ZFS storage size check

kocio

Active Member
May 4, 2021
17
2
43
Warsaw
Hi,

When checking ZFS storage size, Zabbix agent reports it from the operating system point of view, which is not useful.

Since storage in PVE is mounted in a special way and no filesystem content is visible, the size is shown for an empty directory (like /local-zfs/), not for the ZFS filesystem pools.

How to make Zabbix aware of real filesystem sizes, so I can monitor ZFS data usage?
 
Last edited:
Not sure if I understood correctly...

Either: the Zabbix agent is running inside the guest, right? Of course if reports the view from its OS point of view.

...or: to monitor the host (or the whole cluster, if present) take a look at https://www.zabbix.com/integrations/proxmox - that's what I use.
 
Zabbix agent is running on PVE node and it sees ZFS storage as normal mounted directories, which are empty - that's what Linux system tools (like df) can see. This is a special PVE way of mounting storage volumes which causes this problem.

You can use ZFS tools to see the usage, but Zabbix agent uses only common Linux commands.
 
Thanks! I was using this tool, but it stopped working 2 years ago (after PVE 8.1 or so). Now it looks like it has been updated and works again with current version.

Zabbix agent is a generic tool, it works with multiple filesystems and is enough for simple things like warning about shrinking space. Maybe they will start using more specific solutions one day - including how PVE is mounting storage - that would be more handy:

https://github.com/zabbix/zabbix/tree/master/src/go/cmd/zabbix_agent2