SOLVED TrueNAS-12.0-BETA and Zabbix SNMP

Brezlord

Contributor
Joined
Jan 7, 2017
Messages
189
Hi all. I have upgraded to TrueNAS-12.0-BETA and most of the SNMP sources are no longer working. I can no longer get ARC/L2ARC size, IOPs but Network traffic is working. Have the mibs changed with TrueNAS 12?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Have the mibs changed with TrueNAS 12?

The FREENAS-MIB.txt in /usr/local/share/snmp/mibs is now at revision 202005280000Z. In 11.3-U3.2, it was at revision 201905120000Z; so yes, the MIB has changed. However, in both revisions, the MIBs for pool IOPS and ARC/L2ARC size don't appear to have changed:

Code:
zpoolReadOps1sec OBJECT-TYPE
    SYNTAX Counter64
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "The number of read I/O operations sent to the pool or device,
        including metadata requests (over 1 second interval)."
    ::= { zpoolEntry 12 }

zpoolWriteOps1sec OBJECT-TYPE
    SYNTAX Counter64
    MAX-ACCESS read-only
    STATUS current
    DESCRIPTION
        "The number of write I/O operations sent to the pool or device
        (over 1 second interval)."
    ::= { zpoolEntry 13 }

zfsArcSize OBJECT-TYPE
    SYNTAX Gauge32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
        ""
    ::= { arc 1 }

zfsL2ArcSize OBJECT-TYPE
    SYNTAX     Gauge32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
        ""
    ::= { l2arc 5 }
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
The diff output between the 12.0-BETA and 11.3-U3.2 FREENAS-MIB.txts shows the changes are mostly to MIBs for device temps:

Code:
10c10
<     LAST-UPDATED "202005280000Z"
---
>     LAST-UPDATED "201905120000Z"
19c19
<     REVISION     "202005280000Z"
---
>     REVISION     "201905120000Z"
327,328c327
<         zvolAvailable                Integer32,
<         zvolReferenced               Integer32
---
>         zvolAvailable                Integer32
380,387d378
< zvolReferenced OBJECT-TYPE
<     SYNTAX     Integer32 (0..2147483647)
<     MAX-ACCESS read-only
<     STATUS     current
<     DESCRIPTION
<         ""
<     ::= { zvolEntry 7 }
<
573,619d563
< hddTempTable OBJECT-TYPE
<     SYNTAX      SEQUENCE OF HDDTempEntry
<     MAX-ACCESS  not-accessible
<     STATUS      current
<     DESCRIPTION
<         "Table of HDDs and their temperatures."
<     ::= { freeNas 3 }
<
< hddTempEntry OBJECT-TYPE
<     SYNTAX      HDDTempEntry
<     MAX-ACCESS  not-accessible
<     STATUS      current
<     DESCRIPTION
<         "An entry containing a HDD and its temperature."
<     INDEX       { hddTempIndex }
<     ::= { hddTempTable 1 }
<
< HDDTempEntry ::= SEQUENCE {
<     hddTempIndex    Integer32,
<     hddTempDevice   DisplayString,
<     hddTempValue    Gauge32
< }
<
< hddTempIndex OBJECT-TYPE
<     SYNTAX      Integer32 (0..65535)
<     MAX-ACCESS  read-only
<     STATUS      current
<     DESCRIPTION
<         "Reference index for each observed HDD."
<     ::= { hddTempEntry 1 }
<
< hddTempDevice OBJECT-TYPE
<     SYNTAX      DisplayString
<     MAX-ACCESS  read-only
<     STATUS      current
<     DESCRIPTION
<         "The name of the HDD we are reading temperature from."
<     ::= { hddTempEntry 2 }
<
< hddTempValue OBJECT-TYPE
<     SYNTAX      Gauge32
<     MAX-ACCESS  read-only
<     STATUS      current
<     DESCRIPTION
<         "The temperature of this HDD in mC."
<     ::= { hddTempEntry 3 }
<
 

Brezlord

Contributor
Joined
Jan 7, 2017
Messages
189
I get the following errors:
snmp.JPG

Zabbix can not find the OIDs for eg ArcC is .1.3.6.1.4.1.50536.1.4.6.0

Running bellow command I get the correct OID, I have no idea why it's stopped working.
Code:
[root@zabbix ~]# snmptranslate -On FREENAS-MIB::zfsArcC
.1.3.6.1.4.1.50536.1.4.6


I get the following error read and object
Code:
[root@zabbix ~]# snmpwalk -v 2c -c public 192.168.40.40 FREENAS-MIB::zfsArcC
FREENAS-MIB::zfsArcC = No Such Object available on this agent at this OID
 
Last edited:

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Try removing and reimporting the FREENAS-MIB.
 

Brezlord

Contributor
Joined
Jan 7, 2017
Messages
189
Try removing and reimporting the FREENAS-MIB.
I built a complete new Zabbix VM
When I run the following, I have no problems.
Code:
[root@zabbix ~]# snmpwalk -v 2c -c public 192.168.40.40 IF-MIB::ifDescr
IF-MIB::ifDescr.1 = STRING: ix0
IF-MIB::ifDescr.2 = STRING: ix1
IF-MIB::ifDescr.3 = STRING: bge0
IF-MIB::ifDescr.4 = STRING: bge1
IF-MIB::ifDescr.5 = STRING: lo0
IF-MIB::ifDescr.6 = STRING: pflog0
IF-MIB::ifDescr.7 = STRING: lagg0
IF-MIB::ifDescr.8 = STRING: vlan10
IF-MIB::ifDescr.9 = STRING: vlan40
IF-MIB::ifDescr.10 = STRING: vlan60
IF-MIB::ifDescr.11 = STRING: vlan110
IF-MIB::ifDescr.12 = STRING: vlan120
IF-MIB::ifDescr.13 = STRING: ue0

Anything that has to do with FREENAS-MIB does not work.
Code:
[root@zabbix mibs]# snmpwalk -v 2c -c public 192.168.40.40 FREENAS-MIB::zfsArcSize
FREENAS-MIB::zfsArcSize = No Such Object available on this agent at this OID

I think something is broken.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
OK, then this likely means the 12.0 SNMP MIBs aren't actually implemented yet. Go ahead and enter a bug report.
 

Brezlord

Contributor
Joined
Jan 7, 2017
Messages
189

Brezlord

Contributor
Joined
Jan 7, 2017
Messages
189
This issue has been fixed in TrueNAS-12.0-BETA2.
 

Blackraz0r

Cadet
Joined
Dec 15, 2020
Messages
3
Hello Brezlord,

i saw your recent Posts about TrueNAS and Zabbix.
the last days i tried to Monitor my fresh TrueNAS12U1 install with Zabbix 5.0 (latest version)

May you help me a bit? Can you tell me how you were able to Monitor TrueNas with Zabbix?

I found this site
and there was this link to a template for Zabbix
i downloaded the template
i copied the freenas-mib into the correct folder on my Zabbix VM and also double checked that the file is correctly copied.

when i try to import the template, i get errors about default templates not available so i altered the template file a bit to rename them.

but it just don't work, the only thing i get out of SNMP is the CPU data which works fine, but no data about the disk, dataset quotas or disk space free and such stuff.
i guess that template file from the site above is just horribly outdated and i though obviously you may have found something better ? i just dint found anything else.

may you be so kind to share your template and the way you are using it with me? I'd be really tankful for some help here as im am neither a pro on Zabbix nor on TrueNAS

Best Regards
Chris
 

Brezlord

Contributor
Joined
Jan 7, 2017
Messages
189
I will post info this weekend for you.
 

Brezlord

Contributor
Joined
Jan 7, 2017
Messages
189
Top