#!/bin/zsh

LOG=/tmp/zfs_space_metrics_pipe
rm -f ${LOG}
mkfifo ${LOG}

while (true) {
    zfs list -Hp -o space                           
    sleep 1m
} > ${LOG} &

mtail -logtostderr -progs /opt/zfs_metrics/ -port 9985 -logs ${LOG}