Ad Widget

Collapse

Script template generator snmp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sga
    Junior Member
    • Jun 2016
    • 25

    #1

    Script template generator snmp

    Good afternoon, all right with you?

    I found a script on the internet that generates template for SNMP devices, could run the script on my Zabbix but when importing the template gives error of no value mapping. Someone using this template in 3.0? If you can help me, I need a lot of it.
    The script is as follows: https://github.com/cavaliercoder/mib2zabbix

    Sorry for my bad English. Thank you.
  • batchenr
    Senior Member
    • Sep 2016
    • 440

    #2
    Originally posted by sga
    Good afternoon, all right with you?

    I found a script on the internet that generates template for SNMP devices, could run the script on my Zabbix but when importing the template gives error of no value mapping. Someone using this template in 3.0? If you can help me, I need a lot of it.
    The script is as follows: https://github.com/cavaliercoder/mib2zabbix

    Sorry for my bad English. Thank you.
    Hey - i just tried and it worked.
    i use zabbix 2.6

    my steps was :
    Code:
    yum install "perl(SNMP)" "perl(XML::Simple)"
    cd /bin/
    touch mib2zabbix
    curl -sL -o /bin/mib2zabbix https://raw.githubusercontent.com/cavaliercoder/mib2zabbix/master/mib2zabbix.pl
    used this command to translate mib to oid :

    Code:
    cd /usr/share/snmp/mibs
    snmptranslate -Tz -m  ./WINDOWS-NT-PERFORMANCE-EXCHANGE.mib
    and then :
    Code:
    mib2zabbix -o 1.3.6.1.2.1.1.6
    gives you XML output- saved it to xml file and imported
    works fine but i with there was a way to make a template with more then one OID..

    Comment

    • musinov
      Junior Member
      • Nov 2017
      • 1

      #3
      I've bumped with a problem:

      user@myserver:/usr/share/snmp/mibs$ mib2zabbix -o .1.3.6.1.4.1.6729.2.1.1.7.1.1.1 -N temp.xml
      Smartmatch is experimental at /bin/mib2zabbix line 463.
      OID .1.3.6.1.4.1.6729.2.1.1.7.1.1.1 not found in MIB tree.

      Could you please advise how to solve the issue?
      Internet advise the next solution:
      To disable these warnings, you can add this line to the appropriate scope:
      no if $] >= 5.018, "experimental::smartmatch";

      But I'm not good in Perl and don't know where exactly to add the line((

      Comment

      Working...