mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-07 10:56:49 +00:00
helper: add another munin plugin
This commit is contained in:
parent
2c96a32633
commit
6b416fc28c
24
misc/munin/tahoe-helperstats-active.py
Normal file
24
misc/munin/tahoe-helperstats-active.py
Normal file
@ -0,0 +1,24 @@
|
||||
#! /usr/bin/python
|
||||
|
||||
import os, sys
|
||||
import urllib
|
||||
import simplejson
|
||||
|
||||
configinfo = """\
|
||||
graph_title Tahoe Helper Stats - Active Files
|
||||
graph_vlabel bytes
|
||||
graph_info This graph shows the number of files being actively processed by the helper
|
||||
fetched.label Active Files
|
||||
fetched.draw LINE2
|
||||
"""
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
if sys.argv[1] == "config":
|
||||
print configinfo.rstrip()
|
||||
sys.exit(0)
|
||||
|
||||
url = os.environ["url"]
|
||||
|
||||
data = simplejson.loads(urllib.urlopen(url).read())
|
||||
print "fetched.value %d" % data["CHK_active_uploads"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user