Cosium / zabbix_zfs-on-linux

zabbix template and user parameters to monitor zfs on linux
MIT License
76 stars 50 forks source link

Dublicated discovery items for {#POOLNAME} and {#FILESETNAME} #34

Open jurim76 opened 2 years ago

jurim76 commented 2 years ago

Zabbix throws an error for zpool discovery, if zfs pool and zfs dataset have the same name.

As example, proxmox zfs layout zpool list rpool NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT rpool 952G 3.29G 949G - - 2% 0% 1.00x ONLINE - zfs list rpool NAME USED AVAIL REFER MOUNTPOINT rpool 3.29G 919G 104K /rpool

ZFS: Zfs Pool discovery Cannot create item: item with the same key "zfs.get.fsinfo[rpool,available]" already exists. Cannot create item: item with the same key "zfs.get.fsinfo[rpool,used]" already exists.

tuxick commented 12 months ago

This is because the UserParameter is wrong, it should be: UserParameter=zfs.get.fsinfo[*],/sbin/zfs get -o value $2 -Hp $1