NAME
XAS::Apps::Base::Collector - This module will process alerts
SYNOPSIS
use XAS::Apps::Base::Collector;
my $app = XAS::Apps::Base::Collector->new(
-throws => 'xas-collector',
-options => [
{ 'host=s', '' },
{ 'port=s', '' },
{ 'configs=s' , ''}
]
);
exit $app->run();
DESCRIPTION
This module will process alerts from the message queue. It inherits from XAS::Lib::App::Daemon::POE.
CONFIGURATION
-throws
This sets the default facility for exceptions.
-options
This provides three additional options. There format is what can be supplied to Getopt::Long. The defaults are the supplied values. Those values be can overridden on the command line.
- 'host=s'
-
This is the host that the message queue is on.
- 'port=s'
-
This is the port that it listens on.
- 'configs=s'
-
This is a configuration file that lists all of the collector processes. The configuration file has the following format:
[collector: alert] alias = alert queue = /queue/alert packet-type = xas-alert module = XAS::Collector::Alert
This uses the standard .ini format. The entries mean the following:
[controller: xxxx] - The beginning of the stanza. alias - The alias for this POE session. queue - The message queue to listen on, defaults to '/queue/xas'. packet-type - The message type expected. module - The module that handles that message type.
SEE ALSO
- sbin/xas-collector.pl
- XAS
AUTHOR
Kevin L. Esteb, <kevin@kesteb.us>
COPYRIGHT AND LICENSE
Copyright (C) 2012 by Kevin L. Esteb
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.