Re: trap from subagent

2010-04-07 Thread maxim maxim
Thanks, but my question is not about this , my question is how to compose a varlist in send_trap_vars() in version 1, is like in version 1 or not? and my second question is : Can i to compose varlist without ASN_OBJECT_ID in version , and how to do it? 2010/4/7 Dave Shield > On 7 April 2010 14:

Re: trap from subagent

2010-04-07 Thread Dave Shield
On 7 April 2010 14:45, maxim maxim wrote: > It doesn't clear from FAQ , can you specify more please about > send_trap_vars() for v1? FAQ:Coding 16 How can I get the agent to send an SNMPv1 (or SNMPv2c) trap? It doesn't make any difference whether you use the v1-style API call 'send_easy_trap()'

Re: trap from subagent

2010-04-07 Thread maxim maxim
It doesn't clear from FAQ , can you specify more please about send_trap_vars() for v1? 2010/4/7 Dave Shield > On 7 April 2010 14:10, maxim maxim wrote: > > If i want to use send_trap_vars() for sending trap in v1, can i use with > > variable_list like in send_v2trap() for v2, or it (variable_l

Re: trap from subagent

2010-04-07 Thread Dave Shield
On 7 April 2010 14:10, maxim maxim wrote: > If i want to use send_trap_vars() for sending trap in v1,  can i use with > variable_list like in send_v2trap() for v2, or it (variable_list) should > include only variables without trap oid? Please read the FAQ Dave --

Re: trap from subagent

2010-04-07 Thread maxim maxim
If i want to use send_trap_vars() for sending trap in *v1*, can i use with variable_list like in send_v2trap() for v2, or it (variable_list) should include only variables without trap oid? Thanks, Maxim 2010/4/7 Dave Shield : > On 7 April 2010 11:38, maxim maxim wrote: >> why do i have two out

Re: trap from subagent

2010-04-07 Thread Dave Shield
On 7 April 2010 11:38, maxim maxim wrote: > why do i have two outputs? I have no idea. You have said nothing about how you are starting the agent, what exactly is in your snmpd.conf file, or provided any real details about your setup. I cannot read your mind, and do not intend to waste time try

Re: trap from subagent

2010-04-07 Thread maxim maxim
Thanks, it's work now. Can you please to explain me a two outputs in log file? This my outputs in log file: Apr 7 13:08:31 max snmptrapd[3128]: [UDP: [192.168.168.112]:41119->[192.168.168.6]]: Trap , DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (6333568) 17:35:35.68, SNMPv2-MIB::snmpTrapOID.

Re: trap from subagent

2010-04-06 Thread Dave Shield
On 6 April 2010 18:26, maxim maxim wrote: >snmp_varlist_add_variable(¬ification_vars, > objid_snmptrap, objid_snmptrap_len, This parameter is the name of the varbind to be added. It's inherently of type Object ID, so the size is the number of subidentifiers: >oid objid

Re: trap from subagent

2010-04-06 Thread maxim maxim
g 2010/3/22 Dave Shield : > On 22 March 2010 12:07, maxim maxim wrote: >> it's my code for sending trap from subagent: >> >>oid notification_oid[] ={1, 3, 6, 1, 6, 3, 1, 1, 5, 3}; >>size_t notification_oid_len = OID_LENGTH(notification_oid); >

Re: trap from subagent

2010-03-22 Thread Dave Shield
On 22 March 2010 12:07, maxim maxim wrote: > it's my code for sending trap from subagent: > >        oid  notification_oid[] ={1, 3, 6, 1, 6, 3, 1, 1, 5, 3}; >        size_t notification_oid_len = OID_LENGTH(notification_oid); OK - that's setting the OID of the trap

Re: trap from subagent

2010-03-22 Thread maxim maxim
it's my code for sending trap from subagent: oid notification_oid[] ={1, 3, 6, 1, 6, 3, 1, 1, 5, 3}; size_t notification_oid_len = OID_LENGTH(notification_oid); oid objid_snmptrap[] = { 1, 3, 6, 1, 6, 3, 1, 1, 5, 3 }; size_t objid_snmptrap_len =OID_L

Re: trap from subagent

2010-03-22 Thread maxim maxim
Hi Dave, thanks for the previous answer , i don't succeed to understand my objid_snmptrap[] = { 1, 3, 6, 1, 6, 3, 1, 1, 5, 3 } is looking same as notification_oid, is this right? 2010/3/22 Dave Shield : > On 22 March 2010 11:10, maxim maxim wrote: >> I want to send trap linkDown from subagent ; i

Re: trap from subagent

2010-03-22 Thread Dave Shield
On 22 March 2010 11:10, maxim maxim wrote: > I want to send trap linkDown from subagent ; in the command line i can do it > by > snmptrap -v 2c -c public 127.0.0.1 ""  IF-MIB::linkDown > or > snmptrap -v 2c -c public 127.0.0.1 "" 1.3.6.1.6.3.1.1.5.3 > > > For sending this trap from subabagent i b

trap from subagent

2010-03-22 Thread maxim maxim
I want to send trap linkDown from subagent ; in the command line i can do it by snmptrap -v 2c -c public 127.0.0.1 "" IF-MIB::linkDown or snmptrap -v 2c -c public 127.0.0.1 "" 1.3.6.1.6.3.1.1.5.3 For sending this trap from subabagent i based on notification.c (see below). My question is , what s