This file is indexed.

/usr/share/munin/plugins/tahoe_disktotal is in tahoe-lafs 1.10.0-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python

# This is a munin plugin which pulls data from the server in
# misc/operations_helpers/spacetime/diskwatcher.tac . It produces a graph of how much space is
# present on all disks across the grid, and how much space is actually being
# used. 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
graph_vlabel bytes
graph_category tahoe
graph_info This graph shows the total amount of disk space present in the grid, and how much of it is currently being used.
disk_total.label disk total
disk_total.draw LINE2
disk_used.label disk used
disk_used.draw LINE1"""
    sys.exit(0)

url = os.environ["url"]
data = simplejson.load(urllib.urlopen(url))
print "disk_total.value", data["total"]
print "disk_used.value", data["used"]