I need some help in figuring out how to send a trap via a perl script using
the net-snmp libraries for Perl. I have searched various places (google,
this list etc) and found examples of using Perl system calls to call the
snmptrap binary but none just using either

SNMP::TrapSession
Or
Snmp_trap()

The list search for the above returns an error (colons and _ I guess cause
the search program to kick it). Google returns pages but so far all I found
were examples that I used to create this:

system "/usr/bin/snmptrap -v1 -c $SNMP_COMM_NAME $SNMP_TRAP_HOST
$SNMP_ENTERPRISE_ID $HOSTNAME $SNMP_GEN_TRAP $SNMP_SPECIFIC_TRAP ''
$SNMP_EVENT_IDENT_ONE $SNMP_EVENT_VTYPE_ONE \"$SNMP_EVENT_VAR_ONE\"";

I also checked the tarballs for examples and there is a trap example but it
reads like a trap listener of some sort and not something to send a trap
out.

This is on a RHES system using net-snmp-perl-5.0.9-2.30E.12


Thanks,

Greg


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to