check_zpools bug fixes and new feature to detect unhealthy drives

Written by - 0 comments

Published on - Listed in Monitoring ZFS Icinga Nagios


A new version of check_zpools, an open source monitoring plugin for ZFS Pools, is available.

The latest version (2026-07-22) contains several bug fixes and implements an important new feature to detect failed disks.

Bugfixes

The new release contains a couple of bug fixes:

  • Adjusted the usage output (e.g. when triggered with --help) to clearly show that warning and critical thresholds are mandatory. The output previously showed the -w and -c parameters in square brackets [ ], meaning they were optional.
  • Fixed a critical threshold bug. When the plugin was told to use -w 80 and -c 90, this means that the plugin should alert if a ZFS Pool's usage is above 90%. However the plugin had a bug that didn't handle pools where the usage was EXACTLY at 90%. The bug fix basically changed the code's condition from "bigger than 90%" to "bigger or equal than 90%". A pretty basic fix, however with a very important outcome for the plugin.
  • Adjusted the output for better human readability.

New Feature: Detect failed drives and enhanced performance data (metrics)

This is something pretty cool. The pull request from Jens contains a couple of changes that is able to identify which drives have failed in a degraded ZFS Pool. 

The change also adds multiple performance data (metrics) to the plugin's output, which can then be parsed for creating visual graphs. 

In order to obtain the additional information, check_zpools depends on the JSON output of zpool status, which can be shown using the -j parameter.

The plugin launches this command automatically in the background, if the jq command is available. jq can be installed using apt install jq on Debian and Ubuntu based distributions or dnf install jq on Enterprise Linux distributions.  

However it's important to note that the JSON output of zpool only works with OpenZFS 2.2.2 and later. For Debian this means starting with Debian 13. For Ubuntu LTS this starts with Ubuntu 26.04. The plugin automatically detects, whether or not the command is working. If the json output isn't working, the old plugin output will be shown. 

So if you run a fairly recent Linux distribution with a recent version of ZFS, the plugin will check the drive health status and show additional performance data as this:

Icinga check showing ZFS Pool with drive health status

Kudos and thanks to Jens for this nice new feature! 


More recent articles:

RSS feed

Blog Tags:

  AI   AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Observability   Office   OpenSearch   PHP   Perl   Personal   PostgreSQL   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Znuny   Zoneminder