Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

How to send an SNMP V2C Trap

by w3ntp (Beadle)
on Jan 25, 2006 at 13:07 UTC ( [id://525438]=perlquestion: print w/replies, xml ) Need Help??

w3ntp has asked for the wisdom of the Perl Monks concerning the following question:

I would like to use Perl to send a SNMP V2C SNMP_Cold_Start Trap (OID 1.3.6.1.6.3.1.1.5.1). The writeup from the SNMP documentation states that the first two variable bindings fields of a snmpV2c Trap need to include: sysUpTime.0 and snmpTrapOID.0 then the SNMP_Cold_Start trap field. I know how to send a single varbind field, but not sure how to send multiple varbind fields in a single trap. Any suggestions or example of snmpv2c code? thanks W3NTP

Replies are listed 'Best First'.
Re: How to send an SNMP V2C Trap
by spadacciniweb (Curate) on Jan 25, 2006 at 15:52 UTC
      I have defined the following PDU for the SNMP ver 2c trap as

      $sysUpoid="1.3.6.1.2.1.1.3.0"; $svSvcName="1.3.6.1.6.3.1.1.4.1.0"; $ColdStartoid="1.3.6.1.6.3.1.1.5.0"; @snmpColdTrap=qw($sysUpoid TIMETICKS 200 $svSvcName OBJECT_IDENTIFIER $svSvcName $ColdStartoid OBJECT_IDENTIFIER $ColdStartoid);

      Perl is complaining about the OBJECT_IDENTIFIER. Not Sure what to do to correct this. The perl docs state the first two Varbinds are sysUpTime and snmpTrapOID before the coldstart OID. Not sure what the second varbind does? thanks W3NTP

      Edit: g0n - code tags

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://525438]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-03-29 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found