Get description of OID - SNMP - snmp

I'm trying to read data off a Cisco Meraki MX84 using SNMP. I can successfully get data from the oids using snmpget and the OSX tool MIBBrowser. The problem I'm having is that the oid is hard to interpret. Is there a command I can run with snmpwalk or using another tool to see the human readable description of each oid?

You need the MIB to get the information about the MIB objects (including their name, meaning, etc). A google search "Cisco Meraki MIB" will give you the answer.

Related

How to get and set OID value in custom SNMP MIB

I am very new to SNMP and I need to get "system uptime" using our own enterprise OID.
I have already obtained an IANA number and created a MIB file.
The problem is when I use snmpget command with our OID, I get an object not found error at the command prompt.
Although when I do a snmptranslate on our object, I get the exact OID of that object.
If any additional information is required from my side, please let me know.
When you use snmpget, an SNMP request is made via IP to an SNMP agent on a remote (or local) host to return a specific piece of data. A MIB is used to describe in human readable terms, what that data is and where to find it. On the other hand, snmptranslate is a tool used to parse a given MIB. It parses a local MIB file, and doesn't make any contact with an agent.
Since you mentioned creating a new MIB, I assume your trying to add new functionality to an SNMP agent. To do this, the agent must be extended. If you're using Net-SNMP, there are a few options including compiling new source code into the agent, using a sub-agent, and using external scripts via pass and pass-persist protocol. Take a look at:
http://www.net-snmp.org
http://vincent.bernat.im/en/blog/2012-extending-netsnmp.html

Zabbix Hostname Macro in SNMP OID

I'm running Zabbix 2.2.5 and I'm trying to create a template with a couple of SNMP items.
I want to setup my template such that it uses the hostname macro within the SNMP OID, however no matter which macro I try and use I can't seem to get Zabbix to correctly resolve it.
An example of the SNMP OID I'm trying to query is:
NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"racka1-exhaust_temperature\"
Where the parent host of the item has the hostname: racka1.
Where I manually specify the OID already including the hostname as above to test, I successfully return a value.
When I set the OID as follows, I get problems:
NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"{HOST.NAME1}-exhaust_temperature\"
I've checked through the list of macro's and their usage locations but I can't judge which might cover SNMP OIDs, without looking through the source code.
I've got logging turned up to 4 in an effort to try and understand what is going on however I'm compounded in my testing by Zabbix setting the item to Not Supported and even though this check is set to run every 60 seconds, once I change the OID, I can't get Zabbix to quickly requeue the changed items.
Is it even possible to use a macro in a SNMP OID? If so which should I be using to mirror the hostname?
According to the linked documentation, under "Additional support for user macros" heading it says that user macros (the ones that look like {$MACRO}) are supported in SNMP OID field. However, {HOST.NAME}-like macros are not supported in SNMP OID and this can be confirmed by looking at the source code.
If you wish to have such support, please register a new ZBXNEXT.

SNMP net-snmp getting different than expected OID translation

I have RFC1628_UPS_MIB (UPS-MIB) and SNMPv2-SMI (SNMPv2-SMI) installed on my system.
I am using net-snmp tool snmptrapd to receive traps.
Traps from my Liebert NPower UPS are being translated through SNMPv2-SMI rather than UPS-MIB as I expect.
I get SNMPv2-SMI::mib-2.33.1.6.3.16 when I am expecting UPS-MIB::upsAlarmFanFailure
Some troubleshooting information:
# snmptranslate -On UPS-MIB::upsAlarmFanFailure
.1.3.6.1.2.1.33.1.6.3.16
# snmptranslate .1.3.6.1.2.1.33.1.6.3.16
SNMPv2-SMI::mib-2.33.1.6.3.16
It seems that both MIBS define the same OID and I lost the coin toss. I am very new to SNMP so I don't expect that I have discovered a flaw in the implementation. Can anybody explain what is happening here or point me to a resource that might?
I am answering my own question.
net-snmp will only use the default set of mibs by default. Adding new mibs to the mibs directory is not enough to get snmptrapd to use the new mib.
The simplest way to get all of the net-snmp tools to see any new mibs added to the mib directory is to add the line mibs ALL to snmp.conf.
My system did not have a default snmp.conf so I created the file /etc/snmp/snmp.conf with the single line mibs ALL
My net-snmp tools including snmptrapd are now able to report the proper oid translations.
Thanks to #LexLi for prompting me to answer my own question.
Thank you nice question and response as well
When someone add enterprise MIB to the standard system MIB. (1.3.6.4.1.#####.1*)
There are most important two steps:
etc/snmp/snmp.conf
mibs: (before) ---> you need to change mibs ALL
Add your mibs to here
/usr/share/snmp/mibs/
After that you must be restart on the system.
and test the command
snmpwalk -v2c -c public address (192.168.1.1)
snmpget -v2c -c public address (192.168.1.1) .1.3.6.1.4.1.#####.1
Keep on going. Well

Cisco router date time via SNMPv2

Im trying to get internal cisco router date time via SNMP.
CLI analog of what I want to get is "show clock".
Is there any specific OID to get this information via SNMP (besides the upTime OID which are not helpful in this case)?
Thank you in advice!
I think the OID you're looking for is:
1.3.6.1.4.1.9.9.131.1.1.1 - csyClockDateAndTime
From the Description: "The current local date and time for the system."
It's a read-write object (read-only on some systems).
Pls refer to http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en&translate=Translate&objectInput=1.3.6.1.4.1.9.9.131.1.1.1.

SNMP OID: How to find the firmware version of a cisco switch from MIB

I am looking for a OID to get the firmware version of a Cisco Switch using SNMP.
I tried the below MIB files, i couldn't.
OLD-CISCO-CHASSIS-MIB.mib
ENTITY-MIB.my
CISCO-ENTITY-ASSET-MIB
Do anybody know the OID, if so, kindly post me. Thanks
Probably you already did that but try querying the sysDescr OID. Usually it contains model number and software information.

Resources