Ad Widget

Collapse

Discovery vs MIB vs Templates - Newbie/Not Newbie Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brewsy
    Junior Member
    • May 2024
    • 1

    #1

    Discovery vs MIB vs Templates - Newbie/Not Newbie Help

    Hi All,
    First of all Id like to say that I really really like Zabbix. I'm in the MnE space and use it with many different clients for 'basic' monitoring and alerts e.g. NAS disk space alerts or power monitoring of PDUs/UPS's.
    It works GREAT when there is a template available within the Zabbix GUI.
    My experience level is that of someone working in the TV/Film industry for 20+ years, have created and supported multiple complex systems involving varied OS's, interfaces, networking etc. etc. but by my own admission I am NOT any kind of coder.

    However I am having a REALLY hard time trying to get my head around working with any devices that dont have working templates but do have an MIB file that one can download from the manufacturer.
    I have done plenty of web searches on "how to import MIBs" and unfortunately none are sufficiently stupid enough for me to get working.
    This guy: https://www.youtube.com/watch?v=SnUiXpgQvFQ
    Has produced a great guide but there is STILL a knowledge gap between what he is saying and the frankly strange way that zabbix seems to do things.

    Discovery rules, Item prototypes, Keys, Value mapping. Have followed everything hes saying and I still get errors that mean nothing to me or Google..
    snmp_parse_oid(): cannot parse OID "1.3.6.1.4.1.13742.4.1.2.2.0.{#SNMPINDEX}".
    Yet earlier steps and snmpwalk (on the zabbix instance) are showing data.

    Can anyone please point me to any kind of guide for a not-idiot idiot?? Its becoming really frustrating and I really really want to continue using this great tool

    Thanks,
    Marc
  • sebastian00222
    Junior Member
    • May 2024
    • 2

    #2
    Hi brewsy,

    The error cannot parse OID ...4.1.2.2.0.{#SNMPINDEX} tells us exactly what is wrong. You are mixing two conflicting SNMP concepts in one line.

    1. The specific fix Remove the .0 from your Item Prototype OID.
    • Wrong: 1.3.6...4.1.2.2.0.{#SNMPINDEX}
    • Correct: 1.3.6...4.1.2.2.{#SNMPINDEX}

    2. The Explanation (The "Why")
    • .0 implies a Scalar (A single, unique value, like "Chassis Temperature"). It signifies "The end of the path."
    • {#SNMPINDEX} implies a Table (A list of values, like "Hard Drives"). It signifies "Replace this with 1, 2, 3...".

    By writing .0.{#SNMPINDEX}, you are asking Zabbix to find a "list inside a single unique value," which is impossible.

    3. MIB vs. Reality Having the MIB is like having a map with street names (Base OIDs).
    • The MIB gives you the "Street Name" (e.g., voltageInput).
    • The Device gives you the "House Number" (The Index).
      • If there is only one house, the number is usually .0.
      • If there is a row of houses, the numbers are .1, .2, .3.

    Summary: If you are using Discovery (LLD), you are dealing with a row of houses. Never put .0 before the index macro.

    Comment

    • troffasky
      Senior Member
      • Jul 2008
      • 587

      #3
      Don't get hung up on the link between MIBs and low-level discovery. All MIBs do is translate numeric OIDs in to more human-readable ones. They are not the key to your success here, but they certainly help when snmpwalking something in order to figure out what each OID is for.
      Your problem is that {#SNMPINDEX} is not being interpolated in to an actual number, so you end up with a string that is not a valid OID.
      Try looking at how one of the factory templates works with a device that you know well. You might want to copy the "SNMP OID" field from the discovery rule in to a text editor as it is quite small and seeing the whole thing should aid your understanding.

      Comment

      Working...