mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-07 10:56:49 +00:00
add munin/tahoe-rootdir-space
This commit is contained in:
parent
da6ab9f522
commit
5da9f42cf8
27
misc/munin/tahoe-rootdir-space.py
Normal file
27
misc/munin/tahoe-rootdir-space.py
Normal file
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user