Hi y’all. Last night I was writing an article for Klara on how to monitor OpenZFS, and I realized that I never released the Nagios plug-in that I wrote to check available disk space on all currently mounted filesystems, whether they’re ZFS or not.
Even if you don’t use Nagios, you may find this useful as a standalone script–or a script to run via cron and report to healthchecks.io (a web service that amounts to a simplistic, already-running version of a full fledged monitoring service like Nagios or icings, and can alert you in any number of ways if it stops receiving “healthy” signals). Health checks is free to use for up to twenty total tests–meaning you can use it to test twenty different metrics, not test things only twenty times.
Anyway, the tool issues OK, WARN, or CRIT based on the worst case found:
jim@banshee:~$ check_all_disk_space
OK
Simple, right? By default, WARN and CRIT are ridicu-high at 93% and 98%. Let’s drop those:
Right now, check_all_disk_space is available by direct download from the project’s main repo on Github.
It should be available as part of the main package at some point later this year–I think we’re about a month or two away from needing to have our annual PR-fest and major release.
Distributions generally pick up and package new major releases fairly soon after they drop.
Thanks Jim, I will put this to use. I have like literally zero monitoring going on of my ZFS pools other than a few manual commands when I’m on the systems. Not ideal, in fact, bad. I’ve never used Nagios for anything, but I’m interested in figuring out how to set that up for system monitoring. Thanks again!
PS, Jim, do you by chance have a Patreon or another place where people can contribute?
Absolutely! In fact, the forum should gently suggest it every now and then, unless the plugin for Patreon is broken (again).
If you start a monthly recurring donation and don’t get your forum badge for it, please let me know.
Those who don’t like Patreon can also donate via PayPal, to paypal@jrs-s.net. I accept donations in any amount offered. Those donations go toward paying the hosting bill for this site, which currently is about 50% paid through community donation, with the rest coming out of my personal wallet.
I have an article that should be coming out at Klara before too much longer than goes over pretty much everything you need.
It doesn’t go into much detail about the nuts and bolts of how Nagios is configured, but it does offer very direct guidance on using the same actual tools (like this one) with the free-to-use (at small scale) service healthchecks.io.