OpenVZ Bean Counters Nagios Script (Visit this link)

rating from 0 votes
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.
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.

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.

Allowed tags: blockquote, strong, a, b, i, u, code

Captcha Reload Image


  • check_multi

    rating from 0 votes
    check_multi is a swiss knife wrapper plugin
  • snagtools Nagios Plugins

    rating from 0 votes
    This is a collection of about 30 plugins for various purposes.
  • check_generic

    rating5 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

    rating from 0 votes
    Checks 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

    rating5 from 1 votes
    check_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).
Catalot 1.3.0 (appkit/v0.9.0-dev, Agavi/1.0.0) | www.netways.de | Legal
© 2009 NETWAYS GmbH. The Program is provided AS IS, without warranty. Licensed under GPLv3.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3.