NAME

Transform::Alert::Output::SNMP::Trap - Transform alerts to SNMP traps

SYNOPSIS

   # In your configuration
   <Output test>
      Type          SNMP::Trap
      TemplateFile  outputs/test.tt

      # See Net::SNMP->new
      <ConnOpts>
         Hostname      snmp.foobar.org
         Port          161  # default
         Version       1    # default
         Community     public  # default
         # ...etc., etc., etc...

         # NonBlocking - DO NOT USE!
      </ConnOpts>
   </Output>

DESCRIPTION

This output type will send a SNMP trap for each converted input. See Net::SNMP for a list of the ConnOpts section parameters.

OUTPUT FORMAT

Output templates should use the following format:

1.3.6.1.2.#.#.#.#  #  Value, blah blah blah...
1.3.6.1.2.#.#.#.#  #  Value, blah blah blah...

In other words, each line is a set of varbinds. Within each line is a set of 3 values, separated by whitespace:

  • OID

  • Object Type (numeric form)

  • Value

A list of object types can be found here.

Please note that SNMPv2 defines the first two variables bindings as such:

# sysUpTime.0   TIMETICKS          $timeticks
# snmpTrapOID.0 OBJECT_IDENTIFIER  $oid
1.3.6.1.2.1.1.3.0       43  ....
1.3.6.1.6.3.1.1.4.1.0    6  ....

Make sure these are included in your template.

CAVEATS

No support for SNMPv1 traps yet, as the sending format is very different. Patches welcome!

TODO

Use Net::SNMPu, when that gets released...

AVAILABILITY

The project homepage is https://github.com/SineSwiper/Transform-Alert/wiki.

The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit http://www.perl.com/CPAN/ to find a CPAN site near you, or see https://metacpan.org/module/Transform::Alert/.

AUTHOR

Brendan Byrd <BBYRD@CPAN.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2012 by Brendan Byrd.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)