Russian version
Add to Del.icio.us
English version
Digg It!

 Old-School dkLab | Constructor | dklab_vzfailcnt: send OpenVZ failcnt changes over e-mail 

Site map :: Project Orphus :: Constructor


2012-10-06
Discuss at the Forum

You may help to develop and improve this library at GitHub

This library misses a detailed documentation, but it is used in various production projects for a long time, so you may use it too. Below is the content of README.txt file.

dkLab vzfailcnt: send OpenVZ failcnt changes and diskspace alerts over e-mail
(C) Dmitry Koterov, http://en.dklab.ru/lib/vzfailcnt/
License: GPL

This simple script is aimed to watch for a failcnt growth in
/proc/user_beancounters under OpenVZ. In addition, it also watches
for remaining diskspace and diskinodes counters and alerts you when
they exceed a particular threshold (default to 80%).

Vzfailcnt sends you a nice-looking e-mail when above values are
increased. When you call the script periodically (e.g. in 5-minute
cron) and it sees that a failcnt or a remaining diskspace/diskinodes
value is changed, it mails you about that.

The main advantage of the script is that it has zero configuration.
It is also written in pure Perl with no deps on non-standard modules,
so it may be copied to any linux machine with OpenVZ.

INSTALLATION

cd /usr/sbin wget http://github.com/DmitryKoterov/vzfailcnt/raw/master/vzfailcnt chmod +x vzfailcnt

SYNOPSIS

1. Send me an e-mail if a failcnt is changed since the last run: # /usr/sbin/vzfailcnt your@email.com 2. You may also define your e-mail and other options in /etc/vzfailcnt.conf and call vzfailcnt with no arguments: # /usr/sbin/vzfailcnt 3. Add script to your crontab using: # echo '*/1 * * * * root /usr/sbin/vzfailcnt' > /etc/cron.d/vzfailcntcron




Dmitry Koterov, Dk lab. ©1999-2017
GZip
Add to Del.icio.us   Digg It!   Reddit