r470 - trunk/sources/munin/plugins

roh at daksha.openmoko.org roh at daksha.openmoko.org
Sat Jun 6 11:33:14 CEST 2009


Author: roh
Date: 2009-06-06 09:33:14 +0000 (Sat, 06 Jun 2009)
New Revision: 470

Added:
   trunk/sources/munin/plugins/beancounters
Log:
 - add beancounters


Added: trunk/sources/munin/plugins/beancounters
===================================================================
--- trunk/sources/munin/plugins/beancounters	                        (rev 0)
+++ trunk/sources/munin/plugins/beancounters	2009-06-06 09:33:14 UTC (rev 470)
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# Plugin to monitor openvz ressource limit hits
+#
+# Usage: Place in /etc/munin/node.d/ (or link it there  using ln -s)
+#
+# Parameters understood:
+#
+# 	config   (required)
+# 	autoconf (optional - used by munin-config)
+#
+# $Log$
+# stolen from cpu
+#
+# Magic markers - optional - used by installation scripts and
+# munin-config:
+#
+#%# family=auto
+#%# capabilities=autoconf
+
+if [ "$1" = "autoconf" ]; then
+	if [ -r /proc/user_beancounters ]; then
+		echo yes
+		exit 0
+	else
+		echo no
+		exit 1
+	fi
+fi
+
+if [ "$1" = "config" ]; then
+
+	echo 'graph_title OpenVZ ressource limit failcounter '
+#	echo "graph_order system user nice idle"
+#	echo "graph_args --base 1000 -r --lower-limit 0 --upper-limit $graphlimit"
+#	echo 'graph_vlabel #'
+#	echo 'graph_scale yes'
+	echo 'graph_info This graph shows which limit was reached how many times since reboot.'
+	echo 'graph_category system'
+#	echo 'graph_period second'
+	tail -n 24 /proc/user_beancounters|cut -b 13-32,120-|awk '{print $1".label "$1"\n"$1".warning 1\n"$1".critical 100\n"$1".type COUNTER\n"$1".min 0"}'
+	exit 0
+fi
+
+tail -n 24 /proc/user_beancounters|cut -b 13-32,120-|awk '{print $1".value",$2}'
+
+


Property changes on: trunk/sources/munin/plugins/beancounters
___________________________________________________________________
Added: svn:executable
   + *




More information about the webdesign-commitlog mailing list