Ad Widget

Collapse

Templates for SNMP - help in configuration | Zabbix 7.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ppuzicki
    Junior Member
    • Jun 2024
    • 5

    #1

    Templates for SNMP - help in configuration | Zabbix 7.0

    Hello everyone.

    I'm new in the Zabbix world and I'm just starting my adventure with this system.
    I have a request for help in modifying one of the original templates.

    I would like to modify the "D-Link DES_DGS Switch by SNMP" template, so that the rules of discovery will work.
    As an example, I will give a rule called "FAN Discovery".
    In the original configuration of the template, I found such OID entries:
    Discovery rule
    SNMP OID: discovery[{#SNMPVALUE},1.3.6.1.4.1.171.12.11.1.7.1.2,{#STATU S},1.3.6.1.4.1.171.12.11.1.7.1.3]
    Click image for larger version

Name:	obraz.png
Views:	977
Size:	40.3 KB
ID:	485771

    Item prototype
    SNMP OID: 1.3.6.1.4.1.171.12.11.1.7.1.3.{#SNMPINDEX}​
    Click image for larger version

Name:	obraz.png
Views:	844
Size:	54.6 KB
ID:	485772

    I have a D-LINK DGS-1510 switch and I managed to find the correct OID for fans:
    Click image for larger version

Name:	obraz.png
Views:	839
Size:	10.2 KB
ID:	485773
    Based on the specific OID, I modified the template as below:
    Discovery rule
    SNMP OID: discovery[{#SNMPVALUE},1.3.6.1.4.1.171.14.5.1.1.2.1.3.1.7,{# STATUS},1.3.6.1.4.1.171.14.5.1.1.2.1.4.1.7]
    Item prototype
    SNMP OID: 1.3.6.1.4.1.171.14.5.1.1.2.1.4.1.7.{#SNMPINDEX}

    Unfortunately, despite the change, I don't see data about the fan


    I noticed the same thing that I don't have data on the switch temperature - Temperature Discovery:
    Discovery rule
    SNMP OID: discovery[{#SNMPVALUE},1.3.6.1.4.1.171.14.5.1.1.1.1.4.1.1]
    Item prototype - I don't understand this entry in the template
    SNMP OID: 1.3.6.1.4.1.171.12.11.1.8.1.2.{#SNMPINDEX}

    SNMPwalk:​
    Click image for larger version

Name:	obraz.png
Views:	891
Size:	7.9 KB
ID:	485774

    Tell me on the example of these 2 things how to correctly configure the templates.
    Thank you very much in advance.​

    Best regards
    Pawel


  • Ducci
    Junior Member
    • Feb 2024
    • 6

    #2
    Hello Hello,
    I will try to share my little experience with you.

    I don't have confirmation, but from my tests, it seems that from the Zabbix interface, it does not perform snmpwalk but snmpget instead.
    Therefore, you will need to add a .0 at the end of your OID (Example: 1.3.6.1.4.1.171.12.11.1.8.1.2.0{#SNMPINDEX} if you want 1.3.6.1.4.1.171.12.11.1.8.1.2.{#SNMPINDEX}).
    Secondly, do not modify the base templates, clone them instead, which will always provide you with a reliable base.

    Afterwards, I would advise you to create a simple item (without macros or defined parameters) to test that you are indeed collecting the latest data from your OID.

    Best regards,
    Lucas

    Comment

    Working...