From 5da9f42cf8dc444c12f5fc9395c08bdd53603389 Mon Sep 17 00:00:00 2001
From: Brian Warner <warner@allmydata.com>
Date: Fri, 28 Mar 2008 16:18:09 -0700
Subject: [PATCH] add munin/tahoe-rootdir-space

---
 misc/munin/tahoe-rootdir-space.py | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 misc/munin/tahoe-rootdir-space.py

diff --git a/misc/munin/tahoe-rootdir-space.py b/misc/munin/tahoe-rootdir-space.py
new file mode 100644
index 00000000..e3830fe4
--- /dev/null
+++ b/misc/munin/tahoe-rootdir-space.py
@@ -0,0 +1,27 @@
+#! /usr/bin/python
+
+import os, sys
+import urllib
+import simplejson
+
+configinfo = """\
+graph_title Tahoe Root Directory Size
+graph_vlabel bytes
+graph_category tahoe
+graph_info This graph shows the amount of space consumed by all files reachable from a given directory
+space.label Space
+space.draw LINE2
+"""
+
+if len(sys.argv) > 1:
+    if sys.argv[1] == "config":
+        print configinfo.rstrip()
+        sys.exit(0)
+
+url = os.environ["url"]
+
+data = int(urllib.urlopen(url).read().strip())
+print "space.value %d" % data
+
+
+
-- 
2.45.2