snmpget returns “No Such Object available on this

2019-02-13 18:31发布

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条回答
啃猪蹄的小仙女
2楼-- · 2019-02-13 18:45

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)

查看更多
登录 后发表回答