I am trying to configure SNMP agent as per the below link.
http://www.net-snmp.org/tutorial/tutorial-5/toolkit/mib_module/
- I have placed .c and .h file in the agent/mibgroup folder then
./configure --with-mib-modules="nstAgentModuleObject"
- make
make install
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.
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)