ZFS Pool not discovered

Hi all,

currently i’m testing the ZFS monitoring via LibreNMS. For this i use a test server with some basic zfs pool. I followed the guide for the LibreNMS extensions here Applications - LibreNMS Docs

my pool:

sudo zpool status
  pool: data
 state: ONLINE
  scan: none requested

        NAME        STATE     READ WRITE CKSUM
        data        ONLINE       0     0     0
          raidz2-0  ONLINE       0     0     0
            sda     ONLINE       0     0     0
            sdh     ONLINE       0     0     0
            sdf     ONLINE       0     0     0
            sdd     ONLINE       0     0     0
            sdg     ONLINE       0     0     0
            sde     ONLINE       0     0     0


sysServices    72
master  agentx
com2sec readonly  default         xxxxxx
group MyROGroup v2c        readonly
view all    included  .1                               80
access MyROGroup ""      any       noauth    exact  all    none   none
syslocation xxxxx
syscontact xxxxxx
extend distro /usr/bin/distro
extend hardware '/bin/cat /sys/devices/virtual/dmi/id/product_name'
extend manufacturer '/bin/cat /sys/devices/virtual/dmi/id/sys_vendor'
extend serial '/bin/cat /sys/devices/virtual/dmi/id/product_serial'
extend zfs 'sudo /etc/snmp/zfs-linux'
extend mdadm /etc/snmp/mdadm

in the sudoers config i added this line:

snmp ALL=(ALL) NOPASSWD: /etc/snmp/zfs-linux

and i have the script in my snmp folder:

$ ls -la /etc/snmp
total 32
drwxr-xr-x   2 root root  4096 Apr  1 10:07 .
drwxr-xr-x 101 root root  4096 Apr  1 09:45 ..
-rwxr-xr-x   1 root root  3521 Apr  1 10:01 mdadm
-rw-r--r--   1 root root   510 Jun 23  2020 snmp.conf
-rw-------   1 root root  3779 Apr  1 10:07 snmpd.conf
-rwxr-xr-x   1 root root 10236 Apr  1 09:41 zfs-linux

my mdadm array is working:
2022-04-01 12_33_01-Start

but not my ZFS:
2022-04-01 12_33_34-Start

did i missed something? It auto-detects the ZFS application but no array.

i tried to run the script manually and my pool is present there:


Thank you very much

I am also seeing this issue.

the zfs-linux script does produce JSON data that includes the pools. However, those are not returned via snmpd.

I’m debugging still.

Got it.

Here’s my “extend” line:

extend zfs /usr/bin/sudo /etc/snmp/zfs-linux
1 Like

docs pull request made:

1 Like

This was a good hint but not the full solution for me.

What I found is that the username for the snmpd in Ubuntu is “Debian-snmp” and not just “snmp”. I replaced the line “snmp ALL=(ALL) NOPASSWD: /etc/snmp/zfs-linux” in my sudoers config to “Debian-snmp ALL=(ALL) NOPASSWD: /etc/snmp/zfs-linux” and it worked. Seems like “snmp” is not always the default user for the snmp process

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.