NAME

Transform::Alert::Input::Syslogd - Transform alerts from an internal Syslog daemon

SYNOPSIS

   # In your configuration
   <Input test>
      Type      Syslogd
      Interval  5  # you should set this to be very short

      # See Net::Syslogd->new
      <ConnOpts>
         LocalAddr  192.168.1.1
         LocalPort  514  # default
         # Timeout - don't bother
      </ConnOpts>
      # <Template> tags...
   </Input>

DESCRIPTION

This input type will spawn a syslog listener and process each message through the input template engine. If it finds a match, the results of the match are sent to one or more outputs, depending on the group configuration.

See Net::Syslogd for a list of the ConnOpts section parameters. The Timeout parameter is basically ignored, since get_message calls will use a timeout of 0 (ie: instant). This is so that the main daemon doesn't bother waiting for messages during each heartbeat. As such, the Interval setting should be set very low. (But, not zero; that would be unwise...)

OUTPUTS

Text

$addr:$port - $datagram

Preparsed Hash

   {
      remoteaddr => $str,
      remoteport => $int,

      priority => $int,
      facility => $str,  # text version
      severity => $str,  # text version
      time     => $str,
      hostname => $str,
      message  => $str,
   }

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) 2013 by Brendan Byrd.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)