Ad Widget

Collapse

SNMP v1 Template with Discovery

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bughatti
    Junior Member
    • Aug 2018
    • 4

    #1

    SNMP v1 Template with Discovery

    Team, I am new to Zabbix, been working with it for a couple weeks now. I have been able to get most stuff working out of the box fine. I currently use the SNMP Generic and SNMP Interfaces for my Edgerouter ER-X-SFP devices and it works fine. I have been researching for days on how to monitor my Nano M5 devices since they are SNMP v1. There are a few templates that I have tested and do not work and some people that created External checks that I really dont want to use. I have had a small amount of success with just creating my own template and assigning items to OID values I get from SNMP walks. I have found a few posts online that has been helpful about doing a discovery with item prototypes. https://www.zabbix.com/documentation...very/snmp_oids For the most part I understand and running some of the commands in snmp walk works, but discovery is not posting any data. For now I am just trying to copy over the items in the SNMP Interfaces template to a SNMP Interfaces v1 template and change everything to SNMP v1.

    When I do an snmp walk snmpwalk -v 1 -c comm 10.55.99.10 IF-MIB::ifDescr

    IF-MIB::ifDescr.1 = STRING: lo
    IF-MIB::ifDescr.2 = STRING: eth0
    IF-MIB::ifDescr.3 = STRING: eth1
    IF-MIB::ifDescr.4 = STRING: wifi0
    IF-MIB::ifDescr.5 = STRING: ath0
    IF-MIB::ifDescr.6 = STRING: eth0.999
    IF-MIB::ifDescr.7 = STRING: ath0.999
    IF-MIB::ifDescr.8 = STRING: ath0.111
    IF-MIB::ifDescr.9 = STRING: br0
    IF-MIB::ifDescr.10 = STRING: br1

    When I do
    snmpwalk -v 1 -c comm 10.55.99.10 IF-MIB::ifAdminStatus.{#SNMPINDEX}
    IF-MIB::ifAdminStatus.{#SNMPINDEX}: Unknown Object Identifier (Index out of range: {#SNMPINDEX} (ifIndex))

    Maybe I am not understanding what the #SNMPINDEX and #SNMPVALUE fields are/do. Maybe I need to use a different OID for discovery?

    Any help would be greatly appreciated.

  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    {#SNMPINDEX} and {#SNMPVALUE} are only valid within Zabbix.
    That macro can not be used as an argument when executing the snmpwalk command.

    {#SNMPINDEX} is expanded to numbers in the discovery process of LLD.
    For each index value, items etc. of each interface are automatically generated.

    If you are using Zabbix 3.4, please refer to the template "Template Net Network Generic Device SNMPv1".
    For discovery, the following SNMP OID is specified.

    Code:
    discovery[{#SNMPVALUE},1.3.6.1.2.1.2.2.1.8,{#IFADMINSTATUS},1.3.6.1.2.1.2.2.1.7,{#IFALIAS},1.3.6.1.2.1.31.1.1.1.18,{#IFNAME},1.3.6.1.2.1.2.2.1.2,{#IFDESCR},1.3.6.1.2.1.2.2.1.2,{#IFTYPE},1.3.6.1.2.1.2.2.1.3]

    Comment

    Working...