Re: agentx: snmpd does not route put to subagent

Juan Carlos Franzoy <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2010/6/7 Wes Hardaker <[email protected]>:
>>>>>> On Fri, 4 Jun 2010 15:41:00 -0300, Juan Carlos Franzoy <[email protected]> said:
>
> JCF> subagent ==> REGISTER (prefix=4 subtree=1.4908.3.20.5) ==> snmpd
> JCF> subagent < == RESPONSE (no error) <== snmpd
>
> JCF> I run: snmpset -v 1 -c public localhost 1.3.6.1.4.1.4908.3.20.5 i 1
>
> You need to register the subagent above the point you actually want to
> set.  Try registering at .20, for example, instead of .5 and see if you
> get the request.  Or set ...20.5.1.1 instead and see if you get the request

It doesn't work, I had already tried.

# ./snmpset -v 1 -c public localhost 1.3.6.1.4.1.4908.3.20.5.1.1 i 1
Error in packet.
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.4908.3.20.5.1.1

>
> [There are ways of registering the exact instance you want as well; my
> memory says you need to set the "inclusive" flag]
It is not necessary this time.

Let see if this help. What I am doing is:

  1) snmp_enable_stderrlog();
  2) debug_register_tokens( "all" );
  3) netsnmp_ds_set_boolean( NETSNMP_DS_APPLICATION_ID,
NETSNMP_DS_AGENT_ROLE, 1 );
  4) netsnmp_ds_set_string( NETSNMP_DS_APPLICATION_ID,
NETSNMP_DS_AGENT_X_SOCKET, "unix:/tmp/agentx_ats" );
  5) if ( init_agent("rtdb2snmptrap_netsnmp") != 0 ) { exit(0) }
  6) netsnmp_handler_registration* myreg =
netsnmp_create_handler_registration( "rtdb2snmptrap", &myHandler,
&oid[0], oidlen, HANDLER_CAN_RWRITE );
  7) netsnmp_register_handler( myreg )
  8) init_snmp( ""rtdb2snmptrap_netsnmp"" )
  9) while (true) {  snmp_select_info( &fds, &fdset, &timeout, &block
) ... select() ... agent_check_and_process( 0 ) }

Thanks

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.