NAME
XAS::Apps::Base::Supervisor - This module will supervise other processes
SYNOPSIS
use XAS::Apps::Base::Supervisor;
my $app = XAS::Apps::Base::Supervisor->new(
-throws => 'xas-supervisor',
-options => [
{ 'address=s', '127.0.0.1' },
{ 'port=s', '9505' },
{ 'cfgfile=s', ''}
]
);
exit $app->run();
DESCRIPTION
This module will start other processes and the supervise them. 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.
- 'address=s'
-
This is the address to listen on.
- 'port=s'
-
This is the port that to listens on.
- 'cfgfile=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::AlertThis 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-supervisor.pl
- XAS
AUTHOR
Kevin L. Esteb, <kevin@kesteb.us>
COPYRIGHT AND LICENSE
Copyright (C) 2013 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.