[AGENT++] error on manage when receiving a trap notfication with a finite number of variable bindings

Karthik Venkataraman karthikv at netnumber.com
Wed Aug 29 20:16:22 CEST 2007


I am a newbie to SNMP. I am unable to send a trap notification that has a
finite number of variable bindings. On the manager, I get the following
error:

20070829.14:02:56: 7642: (1)WARNING: Testing for v3 message: Bad parse of
version

 

I used the "receive_trap.cpp" under snmp++/consoleExamples, to receive the
trap. 

 

On the agent side, it said that the trap was sent. Here's the log message
from the agent:

20070829.14:03:06: 7653: (1)EVENT  : NotificationGenerator: sent trap
(vers)(id)(tdomain)(addr)(vbs)(community/secName)(status):
(1),(1.3.6.1.4.1.17856.1.1.4.1.4.5), (1), (127.0.0.1/10162), (4), (public),
(0)

 

In my agent code, I've loaded my mib and I am sending a trap for one of the
mib objects. Here's the code that I use to send the trap:

Vbx vbs[4];

vbs[0].set_oid("1.3.6.1.4.1.17856.1.1.4.1.3.20");

vbs[0].set_value(6004);

vbs[1].set_oid("1.3.6.1.4.1.17856.1.1.4.1.3.21");

vbs[1].set_value("2007:08:29:12:28:10:EDT");

vbs[2].set_oid("1.3.6.1.4.1.17856.1.1.4.1.3.22");

vbs[2].set_value("Number of Listener threads > thread threshold");

vbs[3].set_oid("1.3.6.1.4.1.17856.1.1.4.1.3.23");

vbs[3].set_value("Replication");

 

UdpAddress dest("localhost/10162");

NotificationOriginator no;

no.add_v2_trap_destination(dest, "defaultV2Trap", "v2trap", "public");

mib->notify("","1.3.6.1.4.1.17856.1.1.4.1.4.5" , vbs, 4);

 

Please let me know where I am going wrong???  I was able to receive the trap
when I didn't have any variable bindings. .

 

Thanks,

Karthik

 

Karthik N. Venkataraman

NetNumber, Inc

Home: (978)-703-0153

Office: (978)-848-2855

Cell:    (978)-985-2543

 




More information about the AGENTPP mailing list