3

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.

k1eran
  • 4,492
  • 8
  • 50
  • 73
prashantp
  • 33
  • 1
  • 4

1 Answers1

4

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:

k1eran
  • 4,492
  • 8
  • 50
  • 73
Tanner
  • 430
  • 1
  • 5
  • 12
  • I am using this (http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_MIB_Module) link to Compile my new MIB module.Example given in this link is working Correct . But when I am using snmpget for my enterprise custom OID , it is giving error ( " No Such Object available on this agent at this OID"). – prashantp Jan 17 '15 at 11:57
  • Can you post the snmpget command, contents and location of snmpd.conf. Be sure your ending your snmpget command with a .0 and you have a v2 community or v3 user defined in your snmpd.conf files. You might also want to try an snmpwalk command on your enterprise tree. – Tanner Jan 18 '15 at 15:48
  • Location of snmpd.conf is '/usr/local/etc/snmpd.conf'. Contents of snmpd.conf is "rwcommunity public" . – prashantp Jan 19 '15 at 02:26