Hi Dave,
              *Thanks for your quick response*.

      I found solution for trap generation , as i reported problem in
previous mail.

      I included following line in snmpd.conf
     * monitor -r 10 -e ScalarEvent myScalarTest  .1.3.6.1.4.1.38151.1.1.1
> 3*

      i,e instead of textual OID representation *integerObject, *i changed
 to numeric OID *.1.3.6.1.4.1.38151.1.1.1 *as shown above

      Finally i got following trap on *snmptrapd* terminal * *
*
*
2011-11-28 17:44:45 localhost [UDP: [127.0.0.1]:54676->[127.0.0.1]:162]:
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (6) 0:00:00.06
SNMPv2-MIB::snmpTrapOID.0
= OID: DISMAN-EVENT-MIB::mteTriggerFired DISMAN-EVENT-MIB::mteHotTrigger.0
= STRING: myScalarTest DISMAN-EVENT-MIB::mteHotTargetName.0 = STRING:
DISMAN-EVENT-MIB::mteHotContextName.0
= STRING: DISMAN-EVENT-MIB::mteHotOID.0 = OID:
SNMPv2-SMI::enterprises.38151.1.1.1.0 DISMAN-EVENT-MIB::mteHotValue.0 =
INTEGER: 20



* Please suggest me on following things*

1) How to add variable bindings to trap ?

2) Following has given in snmpd.conf(5)

*monitor [OPTIONS] NAME EXPRESSION*
*
*
*Note  that  the event will only be triggered once, when the expression
first matches.  This monitor entry will  not fire  again  until  the
monitored condition first becomes false,and then matches again.*
*
*
 I tested the same(*event will only be triggered once, when the expression
first matches)* as given above, it worked like that only.

But my application requires that DisMan Event MIB must generate a trap when
the *expression  matches desired condition *unlike as given in snmpd.conf(5)
i,e when we update new value to the object if it satisfies *expression* then
it must send trap instead of  previous  monitored condition becoming false
and matching again*. How to do that ?*


*
*
*Thanks in Advance*
*Prashant Nirni*






On 28 November 2011 10:57, prashant n <[email protected]> wrote:
>> What is the value of 'integerObject.0' ?
>  Default value of integerObject.0 = 20

Hmmm...  that should  have generated a trap when the agent started up.

Which did you start first - snmpd or snmptrapd?


Try leaving snmptrapd running, and stop snmpd.
Then start it again - what does snmptrapd log?

Dave
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to