From: Brian Warner Date: Tue, 18 Nov 2008 08:25:25 +0000 (-0700) Subject: munin/tahoe_diskused: new plugin to show total disk space used across the grid X-Git-Tag: allmydata-tahoe-1.3.0~415 X-Git-Url: https://git.rkrishnan.org/listings/configuration.rst?a=commitdiff_plain;h=7d68e4397be0f2dd24c3c17e7dd1f197cc9b4e55;p=tahoe-lafs%2Ftahoe-lafs.git munin/tahoe_diskused: new plugin to show total disk space used across the grid --- diff --git a/misc/munin/tahoe_diskused b/misc/munin/tahoe_diskused new file mode 100644 index 00000000..50de687e --- /dev/null +++ b/misc/munin/tahoe_diskused @@ -0,0 +1,22 @@ +#!/usr/bin/env python + +# This is a munin plugin which pulls data from the server in +# misc/spacetime/diskwatcher.tac . It produces a graph of how much space is +# used on all disks across the grid. The plugin should be configured with +# env_url= pointing at the diskwatcher.tac webport. + +import os, sys, urllib, simplejson + +if len(sys.argv) > 1 and sys.argv[1] == "config": + print """\ +graph_title Tahoe Total Disk Space Used +graph_vlabel bytes used +graph_category tahoe +graph_info This graph shows the total amount of disk space used across the grid +disk_used.label disk used +disk_used.draw LINE1""" + sys.exit(0) + +url = os.environ["url"] +data = simplejson.load(urllib.urlopen(url))["used"] +print "disk_used.value", data