snmpget returns "No Such Object available on this agent at this OID"

3.6k views Asked by At

I am trying to configure SNMP agent as per the below link.

http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mib_module/

  1. I have placed .c and .h file in the agent/mibgroup folder then ./configure --with-mib-modules="nstAgentModuleObject"
  2. make
  3. make install

  4. run snmpd

Now i am not able to fetch variable value with the following command

snmpget localhost NET-SNMP-TUTORIAL-MIB::nstAgentModuleObject.0

It gives below error for me.

root@Naseeb:/home/admin-pc/Naseeb/Projects/EMS/net-snmp-5.4.4# snmpget -v2c -c public localhost NET-SNMP-TUTORIAL-MIB::nstAgentModuleObject.0
NET-SNMP-TUTORIAL-MIB::nstAgentModuleObject.0 = No Such Object available on this agent at this OID

Please let me know is there anything missing in the steps.

1

There are 1 answers

0
Phani On

The steps you followed seems to be correct. To confirm if the nstAgentModuleObject is correctly registered, start the snmpd with logs using the following command: snmpd -f -Lo0-6d -DnstAgentModuleObject

Also make sure you place the MIB file in the correct directory (from where the snmpd searches for MIB)