example code does not work
"Devvrat Tripathi" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
Hi i am new to net-snmp and i have been trying to compile an MIB using agentx. I was trying the example program given at http://net-snmp.sourceforge.net/wiki/index.php/TUT:Writing_a_Subagent i have followed exactly the same procedure as they say but when i do snmpget localhost NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0 i get the error Cannot find module (NET-SNMP-TUTORIAL-MIB): At line 0 in (none) NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0: Unknown Object Identifier agentx seems to be working correctly. snmpd -Dagentx shows linux-zseg:/ # agentx_register_app_config_handler: registering .conf token for "agentxsocket" agentx_register_app_config_handler: registering .conf token for "agentxperms" agentx_register_app_config_handler: registering .conf token for "agentxRetries" agentx_register_app_config_handler: registering .conf token for "agentxTimeout" Turning on AgentX master support. Turning on AgentX master support. agentx/master: initializing... agentx/master: initializing... DONE NET-SNMP version 5.3.1 agentx/master: unexpected callback op 4 agentx/master: handle pdu (req=0x6ed4dec0,trans=0x0,sess=0x0) agentx/master: open 0x8126038 agentx/master: opened 0x8136b60 = 5 with flags = a0 agentx/master: send response, stat 0 (req=0x6ed4dec0,trans=0x0,sess=0x0) agentx_build: packet built okay agentx/master: handle pdu (req=0x6ed4dec1,trans=0x0,sess=0x5) agentx/master: in register_agentx_list agentx/master: registered ok agentx/master: send response, stat 0 (req=0x6ed4dec1,trans=0x0,sess=0x5) agentx_build: packet built okay I am also attaching my conf file with this. One thing which i do not understand in that tutorial is what to do with the NET-SNMP-TUTORIAL-MIB.txtfile. I will be really gratefull if somebody can help me with this. best regards devvrat ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
snmpd.conf
(application/octet-stream, 1 KB)
########################################################################### # # snmpd.conf # # - created by the snmpconf configuration program # ########################################################################### # SECTION: Access Control Setup # # This section defines who is allowed to talk to your running # snmp agent. # rouser: a SNMPv3 read-only user # arguments: user [noauth|auth|priv] [restriction_oid] rouser devvrat noauth # rocommunity: a SNMPv1/SNMPv2c read-only access community name # arguments: community [default|hostname|network/bits] [oid] rocommunity mycomm 127.0.0.1 master agentx ########################################################################### # SECTION: Agent Operating Mode # # This section defines how the agent will operate when it # is running. # master: Should the agent operate as a master agent or not. # Currently, the only supported master agent type for this token # is "agentx". # # arguments: (on|yes|agentx|all|off|no) master agentx