NAME

XAS::Apps::Base::Spooler - A spooler for the XAS environment

SYNOPSIS

use XAS::Apps::Base::Spooler;

my $app = XAS::Apps::Base::Spooler->new(
    -throws => 'xas-spooler',
    -options => [
        { 'host=s'    => 'localhost' },
        { 'port=s'    => '61613' }
        { 'configs=s' => '' },
    ]
);

exit $app->run();

DESCRIPTION

This module starts up several POE sessions to process spool files and send them to the message queue. It inherits from XAS::Lib::App::Daemon::POE. Please see that module for additional documentation.

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 spool directories to process. The configuration file has the following format:

[spooler: alerts]
alias = alerts
directory = alerts
packet-type = xas-alert

This uses the standard .ini format. The entries mean the following:

[spooler:xxxx] - The start of a new section. Where xxxx can 
                 be anything.
alias          - The alias for the POE session.
directory      - The directory to scan, this is relative to
                 the XAS spool directory.
queue          - The message queue to use, defaults to /queue/xas.
packet-type    - The packet type of the spool data. This is
                 used by the collector when storing the packet 
                 into the database.

SEE ALSO

sbin/xas-spooler.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.