Callback Operation Messages

2011-03-24 Thread Brendan Tauras
Hello, I am successfully getting callbacks in a SNMP polling program, and I noticed that there are different callback message types as per snmp_api.h: #define NETSNMP_CALLBACK_OP_RECEIVED_MESSAGE 1 #define NETSNMP_CALLBACK_OP_TIMED_OUT 2 #define NETSNMP_CALLBACK_OP_SEND_FAILED 3 #define

Re: how to use "extend" and run-on-set?

2011-03-24 Thread Niels Baggesen
Den 24-03-2011 17:07, Donald Russell skrev: > ext='\"dnr\"' > snmpset -v 2c -c private localhost \ > nsExtendStatus.$ext = 'createAndGo' \ > nsExtendRunType.$ext = 'run-on-set' \ > nsExtendCommand.$ext = '/bin/date' \ > nsExtendArgs.$ext = '' > > But that resulte

Re: how to use "extend" and run-on-set?

2011-03-24 Thread Donald Russell
On Thu, Mar 24, 2011 at 09:15, Dave Shield wrote: > On 24 March 2011 16:07, Donald Russell wrote: > > ext='\"dnr\"' > > Untested, but try > either > >ext='"dnr"'(i.e. single quote, double quote > then the string, > then double quote, sing

Re: how to use "extend" and run-on-set?

2011-03-24 Thread Dave Shield
On 24 March 2011 16:15, Dave Shield wrote: > On 24 March 2011 16:07, Donald Russell wrote: >> ext='\"dnr\"' > > Untested, but try > either >    ext='"dnr"' > or >   ext=\"dnr\" I can now confirm that both of these work as expected. Also, it's not necessary to explicitly set nsExtendArgs to b

Re: how to use "extend" and run-on-set?

2011-03-24 Thread Dave Shield
On 24 March 2011 16:07, Donald Russell wrote: > ext='\"dnr\"' Untested, but try either ext='"dnr"'(i.e. single quote, double quote then the string, then double quote, single quote or ext=\"dnr\" You only need one of these to escap

Re: installing net-snmp on Solaris 10

2011-03-24 Thread Niels Baggesen
Den 24-03-2011 00:54, Eric Smith skrev: > I was able to go proceed and finish make and make install. During make > install I get some messages like below, in any case my install completes. > > -- > Libraries have been installed in:

Re: how to use "extend" and run-on-set?

2011-03-24 Thread Donald Russell
> > > Or, the man page says "extend" items can be added dynamically that > would > > be great... I can have a system start up script dynamically add the > > run-on-get and the run-on-set scripts. (Actually the same script, args > would > > determine action taken) > > That would use SET requests

Re: ip address configuration via snmp

2011-03-24 Thread Ravi Kumar
- what version of the agent are you using? net-snmp 5.5 - what operating system is this running on? Linux. please see the output of uname #uname -a Linux testserver 2.6.18-194.el5xen #1 SMP Tue Mar 16 22:01:26 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux - how have you configured access c

RE: Trap retries

2011-03-24 Thread Lewis Adam-VNQM87
> -Original Message- > From: [email protected] > [mailto:[email protected]] On Behalf Of Dave Shield > Sent: Thursday, March 24, 2011 2:30 PM > To: Lewis Adam-VNQM87 > Cc: [email protected] > Subject: Re: Trap retries > > On 24 March 2011 14:10, Le

Re: Trap retries

2011-03-24 Thread Dave Shield
On 24 March 2011 14:10, Lewis Adam-VNQM87 wrote: > What are you suggesting that schedules the retransmission? > The net-snmp code detecting the trap send fail or the lower > level protocol stack detecting the udp pdu send fail? My *guess* (based on nothing at all) is that it might be the net-snm

RE: Trap retries

2011-03-24 Thread Lewis Adam-VNQM87
> -Original Message- > From: [email protected] > [mailto:[email protected]] On Behalf Of Dave Shield > Sent: Thursday, March 24, 2011 1:44 PM > To: Lewis Adam-VNQM87 > Cc: [email protected] > Subject: Re: Trap retries > > On 24 March 2011 13:20, Lewi

Re: Trap retries

2011-03-24 Thread Dave Shield
On 24 March 2011 13:20, Lewis Adam-VNQM87 wrote: >  that's what I thought and yet ... that's what we're seeing. > It may be something lower down in our protocol stack. The other thought that springs to mind is if the 'send' fails (because the interface is already down). Maybe that then schedule

RE: Trap retries

2011-03-24 Thread Lewis Adam-VNQM87
> -Original Message- > From: [email protected] > [mailto:[email protected]] On Behalf Of Dave Shield > Sent: Thursday, March 24, 2011 12:56 PM > To: Lewis Adam-VNQM87 > Cc: [email protected] > Subject: Re: Trap retries > > On 24 March 2011 12:20, Le

Re: Trap retries

2011-03-24 Thread Dave Shield
On 24 March 2011 12:20, Lewis Adam-VNQM87 wrote: > Looking in snmp_agent.c and snmp_api.c I can see retry and timeout code > for requests associated with a session. What is not clear is if this applies > for the sending of traps. Is the default behaviour to retry sending the trap > 5 times, once e

Re: ip address configuration via snmp

2011-03-24 Thread Dave Shield
On 24 March 2011 12:17, Ravi Kumar wrote: > Is there any standerd mib table which can be used for ipaddress > configuration on interfaces. > I tried snmpset on ipAddressTable That looks like the place to handle this, yes. I've had a quick look at the code, and it does seem to include SET support

Trap retries

2011-03-24 Thread Lewis Adam-VNQM87
I'm using agent code from release 5.4.2.1 [in an embedded environment] and am testing what happens if I try to send an SNMPv1 trap when the interface briefly goes down. Looking in snmp_agent.c and snmp_api.c I can see retry and timeout code for requests associated with a session. What is not clea

ip address configuration via snmp

2011-03-24 Thread Ravi Kumar
Hi, Is there any standerd mib table which can be used for ipaddress configuration on interfaces. I tried snmpset on ipAddressTable (std implementation of net-snmp) but returns the following error. #snmpset -v2c -c public 172.17.148.181ipAddressType.1.\"1.1.1.1\" i 2 ipAddressIfIndex.1.\"1.1.