NAME

vserver_resources - Plugin to graph Vserver resource usage and limits

CONFIGURATION

This plugin uses the following configuration variables

 [vserver_resources]
  env.vservers - specify the vservers to include in the graph
  env.resource - specify the resource to be monitored
  env.limits   - if true, turn on limit graphing

DEFAULT CONFIGURATION

This is the default configuration

 [vserver_resources]
  env.vservers <all vservers>
  env.limits false

EXAMPLE CONFIGURATIONS

The following monitors the RSS value for the vservers named "vserver1 vserver2 vserver3 vserver4" and looks to see if the resource limit has been breached, if so it sends a message to nagios via send_nsca, and sends an email to notify that this has happened:

 [vserver_resources]
  user root
  env.vservers vserver1 vserver2 vserver3 vserver4
  env.resource RSS
  env.limits 1
  contacts nagios email
  contact.nagios.command /usr/bin/send_nsca -H your.nagios-host.here -c /etc/send_nsca.cfg
  contact.email.command mail -s "Munin-notification for ${var:group} :: ${var:host}" your@email.address.here

This second example monitors the VM value for all vservers on the system and has no limit notifications turned on:

 [vserver_resources]
  user root
  env.vservers vserver5 vserver6 vserver7
  env.resource VM
  env.limits 0

This last example monitors all the resources for vserver5. Note that this will be a busy graph, and it would be really useless if you specified more than one vserver when the resource is set to ALL:

 [vserver_resources]
  user root
  env.vservers vserver5 
  env.resource ALL
  env.limits 0

USAGE

Possible values for env.resource are:

ALL

all the below resources

PROC

number of processes

VM

sum of all virtual pages inside the guest

VML

sum of all virtual pages locked into memory

RSS

number of pages currently present in RAM

ANON

number of anonymous memory pages

FILES

number of open files

OFD
LOCKS
SOCK
MSGQ
SHM

number of shared memory pages

AUTHORS

Copyright (C) 2006-2008 Holger Levsen, Micah Anderson

LICENSE

GNU GPLv2

TODO

Less shell subprocesses

The plugin uses lots and lots of shell subprocesses. Maybe factor common vserver plugin code into Munin::Plugin::Linux::Vserver?

Multigraph

make it so you can specify more than one resource to be graphed? Alternatively define combined ressource-display: VM+RSS+ANON+SHM and FILES+OFD+LOCK+SOCK (for one vserver only), and/or make it so you can graph all resources for one vserver

Default resource

set a default for the resource if it is unset?

Use /proc less often

use /proc less often (100 times more overhead than talking to the kernel directly) i.e. use something like pagesize=\`perl -MPOSIX -e 'print POSIX::sysconf(_SC_PAGESIZE), "\n";'\`

BUGS

The "ALL" resource is broken

MAGIC MARKERS

  #%# family=auto
  #%# capabilities=autoconf