Giter VIP home page Giter VIP logo

Comments (5)

cavaliercoder avatar cavaliercoder commented on May 16, 2024 3

Well done! And thank you so much for sharing your solution. I'm sure it will help others too.

from mib2zabbix.

nick26726 avatar nick26726 commented on May 16, 2024 1

@cavaliercoder, @romale Thank you for reply back to me.

After you guy advised to me, I did my experimentation on loading mib module into Net-SNMP tools properly.

Assume that I already installed mib file into mib directory. (/usr/share/snmp/mibs/COMTECHEFDATA-CEFDDEMODSHELF-MIB.txt)

Before loading mib file into Net-SNMP tools. Try running "snmptranslate" to check that MIB is correctly loaded or not?

[root@zbllk mibs]# snmptranslate 1.3.6.1.4.1.6247.98.3.1.22
SNMPv2-SMI::enterprises.6247.98.3.1.22

As you can see that the 6247.98.3.1.22 is not already recognized by Net-SNMP tools.

Loaded the mib file into Net-SNMP tools. (for only this session console.)

[root@zbllk mibs]# export MIBS=+COMTECHEFDATA-CEFDDEMODSHELF-MIB

After loading mib file into Net-SNMP tools. Running "snmptranslate" again.

[root@zbllk mibs]# snmptranslate 1.3.6.1.4.1.6247.98.3.1.22
COMTECHEFDATA-CEFDDEMODSHELF-MIB::cefdDemodShelfEncryptionGroup

Now "6247.98.3.1.22" already recognized by Net-SNMP tools.

Let using "mib2zabbix" again.

mib2zabbix -f /home/xxx/tempzabbix.xml -e -o .1.3.6.1.4.1.6247.98

It's worked for now, and your script working without any error. Thank you very much 😄

image

from mib2zabbix.

romale avatar romale commented on May 16, 2024

@nick26726 , add
mib +YOURMIBNAME
to your ~/.snmp/snmp.conf

from mib2zabbix.

cavaliercoder avatar cavaliercoder commented on May 16, 2024

This script uses the SNMP libraries, so if they aren't configured with the desired MIB, you will see this issue. Can you confirm with any one the Net-SNMP tools, that this MIB is correctly loaded?

from mib2zabbix.

AriCMSC avatar AriCMSC commented on May 16, 2024

I'm having a similar issue with this. The items I want to view and convert to a zabbix template all have an OID like this:
1.3.6.1.4.1.xx.yy.[unique value] all the items have the xx.yy in their OID.

If I use snmptranslate on the file these items are in, I see their names and the correct OID. But if I try to translate any singular item, this is what happens:

snmptranslate 1.3.6.1.4.1.xx.yy.[unique value]
 SNMPv2-SMI::enterprises.xx.yy.[unique number]

enterprises is defined in an SMI file and that is where the xx for the OIDs is defined. The yy is defined in the same MIB file all the items I need is defined in. How do I get the snmp commands to recognize this file so I can properly look up my items and translate them into a template?

edit: I found the SMI file was RFC1155-SMI and it was labelled as a text file in my team repo. I found a free download of the MIB file and I tried export MIBS=+RFC1155-SMI but snmptranslate still can't recognize the OID

update: figured it out. I had to export the MIB file containing the items itself and then the translations started working. Thank you to this Issue page for being my rubber duck while I figured this out :)

from mib2zabbix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.