Re: Sending traps using Perl
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <OFA01C4972.CC4A74FE-ON80257919.004FEA73-80257919.00503F78@selexelsag.com> |
I have now managed to send out an SNMPv1 trap correctly using the
following code:
my $host = '10.50.80.197';
my $comm = 'public';
my $session= new SNMP::TrapSession(DestHost => $host, Community =>
$comm, Port => 162, Version => 1);
$session->trap(enterprise=>'.1.3.6.1.4.1.2257.11.1.1.0.0.9',
agent => '127.0.0.1',
generic => 0,
specific => 0);
uptime => 1234);
However I am still unable to send out an SNMP v2 trap.
Also is there a way of obtaining the value for uptime from the Master
Agent which is used for the SysUpTime field in the trap??
Any help would be appreciated.
Regards,
Ali
Please consider the environment before printing this email
-----------------------------------------------
This email and any attached files contains company confidential information which may be legally privileged. it is intended only for the person(s) or entity to which it is addressed and solely for the purposes set forth therein. If you are not the intended recipient or have received this email in error please notify the sender by return, delete it from your system and destroy any local copies. It is strictly forbidden to use the information in this email including any attachment or part thereof including copying, disclosing, distributing, amending or using for any other purpose.
In addition the sender excludes all liabilities (whether tortious or common law) for damage or breach arising or related to this email including but not limited to viruses and libel.
------------------------------------------------------------------------------
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. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
(unnamed)
(image/gif, 987 B) - not displayed