=pod =encoding utf-8 =head1 NAME Transform::Alert - Transform alerts from one type to another type =head1 SYNOPSIS # In your configuration BaseDir /opt/transalert Type POP3 Interval 60 # seconds (default) Username bob Password mail4fun # See Net::POP3->new Host mail.foobar.org Port 110 # default Timeout 120 # default Type Syslog TemplateFile outputs/test.tt # See Net::Syslog->new Name TransformAlert Facility local4 Priority info SyslogHost syslog.foobar.org SyslogPort 514 # default # On a prompt > transalert_ctl -c file.conf -l file.log -p file.pid =head1 DESCRIPTION Ever have a need to transform one kind of alertEmessage into another? For example: =over =item * Taking a bunch of alert emails and converting them into Syslogs =item * Converting Syslog alerts to SNMP traps =item * Converting SNMP traps to Syslogs =item * Traps to email =item * Anything to anything =back Then this platform delivers. Transform::Alert is a highly extensible platform to transform alerts from anything to anything else. Everything is ran through a configuration file, a couple of templates, and L. Or to show it with a UTF8 drawing, the platform works like this: Input ──┬── InTemplate ────────────── Output + OutTemplate ├── InTemplate + Munger ──┬── Output + OutTemplate │ └── Output + OutTemplate ├── InTemplate + Munger ──┬── Output + OutTemplate └── InTemplate ───────────┘ Input ──┬── InTemplate ────────────── Output + OutTemplate └── InTemplate + Munger ───── Output + OutTemplate All L and L are separate modules, so if there isn't a protocol available, they are easy to make. Input templates use a multi-line regular expression with named captures to categorize the variables. Output templates are L templates with a C<<< [% var %] >>> syntax. If you need to transform the data after it's been captured, you can use a "munger" module to play with the variables any way you see fit. =encoding utf-8 =head1 DETAILS =head2 Configuration Format The configuration uses an Apache-based format (via L). There's a number of elements required within the config file: =head3 BaseDir BaseDir [dir] The base directory is used as a starting point for the daemon and any of the relative paths in the config file. The C<<< BaseDir >>> option itself can use a relative path, in which case will start at the config path. =head3 Input # one or more Type [type] Interval [seconds] # optional; default is 60s # section; module-specific #