OpenVZ Bean Counters Nagios Script (Visit this link)
from 0 votesThe OpenVZ kernel provides the file /proc/user_beancounters that tells us if any of these limits have been reached (amoung other information). This is important because a process may fail to start (i.e. tomcat) if the limits have been reached. Kyle Brandt wrote a script in python designed to be executed on the OpenVZ host machine by Nagios.
From: http://www.kbrandt.com/2008/10/openvz-beancounters-nagios-script.html
All credits are to author Kyle Brandt.
"OpenVZ is container-based virtualization for Linux. OpenVZ creates multiple secure, isolated containers (otherwise known as VEs or VPSs) on a single physical server enabling better server utilization and ensuring that applications do not conflict."
For each of these containers or VEs, there are resource limits. The psuedo file system, /proc, tracks various process and kernel information. The OpenVZ kernel provides the file /proc/user_beancounters that tells us if any of these limits have been reached (amoung other information). This is important because a process may fail to start (i.e. tomcat) if the limits have been reached. Kyle Brandt wrote a script in python designed to be executed on the OpenVZ host machine by Nagios.
The script parses /proc/user_beancounters and will exit with appropriate Nagios exit status if one of these limits has been reached. If you don't want to run this script as root, I recommend compiling a shell script with shc to copy the bean_counters file, own it as a unprivilaged user, and then make that a setuid root script (Linux won't usually allow setuid shell scripts, which is why shc can be used to compile it. Does anyone think if the script only copys the file to tmp that this might be dangerious?). This is what the script expects with its current configuration. The script is easy to modify to make it check for other parameters besides the fail count (failcnt) as well.
All credits are to author Kyle Brandt.
"OpenVZ is container-based virtualization for Linux. OpenVZ creates multiple secure, isolated containers (otherwise known as VEs or VPSs) on a single physical server enabling better server utilization and ensuring that applications do not conflict."
For each of these containers or VEs, there are resource limits. The psuedo file system, /proc, tracks various process and kernel information. The OpenVZ kernel provides the file /proc/user_beancounters that tells us if any of these limits have been reached (amoung other information). This is important because a process may fail to start (i.e. tomcat) if the limits have been reached. Kyle Brandt wrote a script in python designed to be executed on the OpenVZ host machine by Nagios.
The script parses /proc/user_beancounters and will exit with appropriate Nagios exit status if one of these limits has been reached. If you don't want to run this script as root, I recommend compiling a shell script with shc to copy the bean_counters file, own it as a unprivilaged user, and then make that a setuid root script (Linux won't usually allow setuid shell scripts, which is why shc can be used to compile it. Does anyone think if the script only copys the file to tmp that this might be dangerious?). This is what the script expects with its current configuration. The script is easy to modify to make it check for other parameters besides the fail count (failcnt) as well.
Submitted by: neocodesoftware
Hits: 682
Overall downloads: 78
Added: 2008-12-30 00:00:00
Last Modified: 2009-10-30 12:25:19
| Filename | Preview | Size | Description | DL |
|---|---|---|---|---|
| nagios_vz_bean.py | 4 kb | Unknown Tag: 'FileDesc1' | 293 |
Comments
Be the first to comment this project.
Leave a reply
If you just want to rate the project leave the other field empty.
Even though it would be nice if you would drop a line.
-
check_multi
from 0 votescheck_multi is a swiss knife wrapper plugin -
snagtools Nagios Plugins
from 0 votesThis is a collection of about 30 plugins for various purposes. -
check_generic
5 from 1 votes...executes any command line and compares the result against a perl expression. A very fast way to get any desired check running... -
check_flexlm
from 0 votesChecks Macrovision FLEXlm license servers. (Requires the lmutil utility for your OS running Nagios - see www.macrovision.com to obtain) -
check_mk - a performant and easy to use generic monitoring plugin
5 from 1 votescheck_mk replaces NRPE, NSClient, check_snmp and other data plugins. It adopts a completely new approach of retrieving data from hosts and network components which is very performant and easy to configure - especially in large monitoring environments. check_mk can easily be integrated into any existing Nagios installation of version 3.X. Check_mk comes with its own Windows agent the supports most things of NSClient and in addition native evenlog log monitoring (no Pearl is needed).
-
Novell Groupwise 8 check
from 0 votesChecks for Novell Groupwise 8. -
check_disk_stale.sh
from 0 votesA local check for Stale NFS mounts, for use on RHEL, Centos, Scientific Linux. I used the mktemp shell utilility, you can change it to fit your needs if you want. -
Check Vulnerabilities
from 0 votesCheck Vulnerabilities FreeBSD "ports", Gentoo "portage", NetBSD "audit-package" -
Check weewar
from 0 votesChecking open games at www.weewar.com -
check_vzquota check_ubc
from 0 votes



