- SEE ALSO
- COPYRIGHT AND LICENSE
XAS::Apps::Logmon::Monitor - A class for the XAS environment
use XAS::Apps::Logmon::Monitor; my $app = XAS::Apps::Logmon::Monitor->new( -throws => 'xas-logmon' ); exit $app->run;
This module will spawn multiple log monitoring processes. It will keep track of them and restart them if they should die. Any output from the monitoring processes are written into the log file.
The configuration file is the familiar Windows .ini format. It has the following stanzas.
[logmon: xas-spooler] command = /usr/sbin/xas-logs filename = /var/log/xas/xas-spooler.log
This stanza defines a log file to monitor. There can be multiple stanzas. The "xas-spooler" in the stanzas name must be unique. Reasonable defaults have been defined for most of the properties. You really only need to use 'filename' to start a monitoring process.
The following properties may be used.
This is the command to run. Defaults to /usr/sbin/xas-logs.
The file to monitor. Defaults to /var/log/xas/xas-spooler.log.
The spool directory to write messages. Defaults to /var/spool/xas/logs.
The number of days prior to today to ignore. Defaults to 30.
Please see XAS::Lib::Process for more details on the following parameters.
The default directory to set for the process. Defaults to "/".
Optional additional environment variables to pass to the process. This should be in this form "key1=value1;;key2=value2".
The possible exit codes that might be returned if the process aborts. These are used to determine if the process should be restarted. Defaults to "0,1". This must be a comma delimited list of values.
The number of retries for restarting the process. Defaults to "5". If this is "-1" then retries are unlimited. Use with caution.
The group to run the process under. Defaults to "xas". Not implemented under Windows.
The priority to run the process under. Defaults to "0". Not implemented under Windows.
The umask to use for the process. Defaults to "0022". Not implemented under Windows.
The user to run the process under. Defaults to "xas". Not implemented under Windows.
This method will process the config file and spawn the log monitoring processes.
This method will start the processing.
No additional command line options are defined.
Kevin L. Esteb, <firstname.lastname@example.org>
Copyright (c) 2012-2015 Kevin L. Esteb
This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.