It’s 2017 and ZFS STILL doesn’t have an API?!?

Why is it that, in 2017, with ZFS, –routinely called the most advanced file system in the world– I’m having to use awk to parse the status output from its built-in tools? Why is there STILL no documented, easily query-able API for me to use? The only way that there is for me to get Python to interact with ZFS is for me to use awkward wrappers with little to no documentation. There’s a bunch of undocumented APIs, but nothing that’s really usable for someone without advanced understanding of the platform. I just want to be notified when a drive dies, or starts having problems.

So I’m left parsing text files, splitting shit into columns, hoping that the output doesn’t change much, and adding in far too many calls to awk to get the info I’m after in any kind of usable form. There’s nothing I can listen for when a drive, zRAID or pool fails! How is that sensible?

More than that, rather than asking exactly how I query zfs to get a particular piece of information, I’m sitting here asking myself “Do I really care about how full a particular file system is?” or really about any zfs fs (awkward) property? This is not the way I thought I’d be writing code in this day and age.

Ugh…