Thank you!

I have managed to make it working.
The tutorial in
http://net-snmp.sourceforge.net/wiki/index.php/TUT:Writing_a_Subagent
helped me a lot,
Yet, the following 2 things helped me make it working:
1. upgrade from 5.6.2 to 5.7.3
2. add agentx in configure
  --with-mib-modules="agentx"
3. add debug capability on running snmpd:
   snmpd -f -Lo: -Dagentx

I would add step2 in that tutorial.... It really took time to find the issues.

Thanks,
ranran


On Mon, Apr 23, 2018 at 1:23 PM, Anders Wallin <walli...@gmail.com> wrote:
> Hi,
>
> the tarball includes a makefile and testscripts that works for 5.7.3 and
> 5.8-pre
> Just run;
> make
> make test1
> make test2
>
> No documentation included, but the script and Makefile should be possible to
> read and understand
>
> Regards
> Anders
>
> mån 23 apr. 2018 kl 07:51 skrev Ran Shalit <ransha...@gmail.com>:
>>
>> Hello,
>>
>> I am trying to run the tutorial for running agentX with MIB as described
>> here:
>>
>> http://net-snmp.sourceforge.net/wiki/index.php/TUT:Writing_a_Subagent
>>
>>
>> Yet, I keep getting "No Such Object available on this agent at this
>> OID".......
>>
>>
>> 1. starting snmpd with:
>>     snmpd -Lo
>>
>> 2. starting example:
>>
>> root@dm814x-evm:~# ./example-demon &
>> root@dm814x-evm:~# example-demon is up and running.
>>
>> 3. trying smpget fails:
>>
>> root@dm814x-evm:~# snmpget -m
>> /usr/share/snmp/mibs/NET-SNMP-TUTORIAL-MIB.txt -v
>> 2c 127.0.0.1 -c public NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0
>> NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0 = No Such Object
>> available on this agent at this OID
>> root@dm814x-evm:~#
>>
>>
>>
>> This is my snmpd.conf:
>> ===================
>> root@dm814x-evm:~# cat /home/root/.snmp/snmpd.conf
>> #s will make snmpd listen on all interfaces
>> agentAddress  udp:161
>>
>> # open to all network (not secured)
>>
>> master  agentx
>>
>> rocommunity public
>> rwcommunity private
>>
>> com2sec readonly  default         public
>> com2sec readwrite default         private
>>
>>
>> mibdirs /usr/share/snmp/mibs/
>> mibs +NET-SNMP-EXAMPLES-MIB
>> mibs +UCD-DEMO-MIB
>> mibs +ETHTOOL-MIB
>> mibs +NET-SNMP-TUTORIAL-MIB
>>
>> ============================
>>
>> I also tried to add debug arguments for snmpd, but I don't see any log
>> after starting it except the following:
>> root@dm814x-evm:~# snmpd -f -Lo: -Dagentx
>> registered debug token agentx, 1
>> 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.
>> /home/root/.snmp/snmpd.conf: line 15: Warning: Unknown token: mibdirs.
>> /home/root/.snmp/snmpd.conf: line 16: Warning: Unknown token: mibs.
>> /home/root/.snmp/snmpd.conf: line 17: Warning: Unknown token: mibs.
>> /home/root/.snmp/snmpd.conf: line 18: Warning: Unknown token: mibs.
>> /home/root/.snmp/snmpd.conf: line 19: Warning: Unknown token: mibs.
>> agentx/master: initializing...
>> agentx/master: initializing...   DONE
>> NET-SNMP version 5.6.2
>>
>>
>>
>> Why there are no further logs in snmpd window after running exampe-demon ?
>> Can someone please advise ?
>> Is there some issue of permissions ?
>>
>> Thank you,
>> ranran
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Net-snmp-coders mailing list
>> Net-snmp-coders@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to