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
config:
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
snmpd.conf
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:
but not my ZFS:
did i missed something? It auto-detects the ZFS application but no array.
EDIT:
i tried to run the script manually and my pool is present there:
{
"deleted":0,
"evict_skip":0,
"mutex_skip":0,
"recycle_miss":0,
"arc_size":1320592,
"target_size_max":8388562944,
"target_size_min":524285184,
"target_size":8388562944,
"target_size_per":100.0,
"arc_size_per":0.015742767966527165,
"target_size_arat":1.0,
"min_size_per":6.25,
"mfu_size":4194281472,
"p":4194281472,
"rec_used_per":50.0,
"freq_used_per":50.0,
"arc_hits":9377,
"arc_misses":0,
"demand_data_hits":0,
"demand_data_misses":0,
"demand_meta_hits":9377,
"demand_meta_misses":0,
"mfu_ghost_hits":0,
"mfu_hits":9186,
"mru_ghost_hits":0,
"mru_hits":191,
"pre_data_hits":0,
"pre_data_misses":0,
"pre_meta_hits":0,
"pre_meta_misses":0,
"anon_hits":0,
"arc_accesses_total":9377,
"demand_data_total":0,
"pre_data_total":0,
"real_hits":9377,
"cache_hits_per":100.0,
"cache_miss_per":0.0,
"actual_hit_per":100.0,
"data_demand_per":0,
"data_pre_per":0,
"anon_hits_per":0,
"mru_per":2.0368987949237494,
"mfu_per":97.96310120507626,
"mru_ghost_per":0.0,
"mfu_ghost_per":0.0,
"demand_hits_per":0.0,
"pre_hits_per":0.0,
"meta_hits_per":100.0,
"pre_meta_hits_per":100.0,
"demand_misses_per":0,
"pre_misses_per":0,
"meta_misses_per":0,
"pre_meta_misses_per":0,
"pools":[
{
"name":"data",
"size":"5995774345216",
"alloc":"285696",
"free":"5995774059520",
"ckpoint":0,
"expandsz":0,
"frag":"0",
"cap":"0",
"dedup":"1.00",
"health":"ONLINE",
"altroot":"-"
}
]
}
Thank you very much
-Felix