
App::OpenVZ::BCWatch - Monitor the OpenVZ user_beancounters file

use App::OpenVZ::BCWatch; $watch = App::OpenVZ::BCWatch->new; $watch->process;

App::OpenVZ::BCWatch monitors the /proc/user_beancounters file and sends mail notifications whenever important values change (as defined by the user).
The recommended usage of this application module is to use the provided vzwatchd daemon.

$watch = App::OpenVZ::BCWatch->new;
Instantiate an App::OpenVZ::BCWatch object.

$watch->process;
Inspect whether the user_beancounters file differs from the last run, and if, report the differences via mail.

Run vzwatchd as root without arguments to obtain a list of commands.

When vzwatchd is started initially, the /etc/vzwatchd.conf file will be generated. The configuration will then subsequently remain inactive until the _active flag is either set within or deleted from the configuration file.
The configuration file is being parsed by Config::File. Unless noted otherwise, each option takes exactly one value. Specifying more than one value for an option requires that the values are separated by whitespace.
Adjustable options with defaults are:
mail[from]
Mail sender address. Defaults to root@localhost.
mail[to]
Mail recipient address. Defaults to root@localhost.
mail[subject]
Mail subject line. Defaults to: vzwatchd: NOTICE.
monitor_fields
One or more field names to monitor for changes. Defaults to: failcnt.
sleep
Sleep interval in seconds. Defaults to 60.
verbose
Be verbose? Defaults to false.
_active
Configuration active? Defaults to false.
Additional options with defaults are:
input_file
Location of the user_beancounters file. Defaults to /proc/user_beancounters.
data_file
Location of the data file. Defaults to $HOME/vzwatchd.dat.



Steven Schubiger <schubiger@cpan.org>

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.