Home » Software » FreeNAS » FreeNAS SNMP OID for ZPool Health

FreeNAS SNMP OID for ZPool Health

FreeNAS SNMP OID for ZPool Health

Monitoring FreeNAS via SNMP can be challenging, here is the SNMP OID for ZPool Health.

FreeNAS SNMP OID for ZPool Health

After stuffing a ton of SATA hard drives into your server chassis and installing FreeNAS (FreeNAS-11.2-U5 in this case), you will likely want to monitor your ZPoolHealth using SNMP.

The FreeNAS MIB (/usr/local/share/snmp/mibs) gives us a clue about zpoolhealth.

:= { enterprises 50536 }

ZPoolHealthType ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
“”
SYNTAX INTEGER {
online(0),
degraded(1),
faulted(2),
offline(3),
unavail(4),
removed(5)
}

This gave me my starting point. I’d need to snmpwalk “enterprises” (“1.3.6.1.4.1”) for Integers, currently at 0 (Zero).

After a quick snmpwalk I was able to narrow down the OIDs.

SSH
#snmpwalk -v2c -c public 192.168.1.99 1.3.6.1.4.1.50536

SNMPWalk & SNMPGET

 

Before removing a device from the z pool:

SSH
#snmpget -c public -v2c 192.168.1.99 SNMPv2 SMI::enterprises.50536.1.1.1.1.7.2 SNMPv2-SMI::enterprises.50536.1.1.1.1.7.2 = INTEGER: 0

This command returned a 0, which is perfect, because my zpool is healthy and online!

After taking a device in my z pool offline:

SSH
#snmpget -c public -v2c 192.168.1.99 SNMPv2-SMI::enterprises.50536.1.1.1.1.7.2 SNMPv2-SMI::enterprises.50536.1.1.1.1.7.2 = INTEGER: 1

Since my I manually degraded my ZPool, a value of “1” was exactly what I expected.

online(0), degraded(1), faulted(2), offline(3), unavail(4), removed(5)

This testing determined that this is the OID for the zpool health (ZPoolHealthType)

SNMPv2-SMI::enterprises.50536.1.1.1.1.7.2
or
.1.3.6.1.4.1.50536.1.1.1.1.7.2

This makes me think that SNMPv2-SMI::enterprises.50536.1.1.1.1.7.1 (or .1.3.6.1.4.1.50536.1.1.1.1.7.1) is likely the boot pool health (untested, but logical).

This should get you started, as there really isn’t much documentation for FreeNAS using SNMP.



unixsamurai.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com. Read our Privacy Policy for more info.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.