source: trunk/misc/operations_helpers/munin/tahoe_diskused

Last change on this file was b856238, checked in by Alexandre Detiste <alexandre.detiste@…>, at 2024-02-15T15:53:34Z

remove old Python2 future statements

  • Property mode set to 100644
File size: 736 bytes
Line 
1#!/usr/bin/env python
2
3# This is a munin plugin which pulls data from the server in
4# misc/operations_helpers/spacetime/diskwatcher.tac . It produces a graph of how much space is
5# used on all disks across the grid. The plugin should be configured with
6# env_url= pointing at the diskwatcher.tac webport.
7
8
9import os, sys, urllib, json
10
11if len(sys.argv) > 1 and sys.argv[1] == "config":
12    print("""\
13graph_title Tahoe Total Disk Space Used
14graph_vlabel bytes used
15graph_category tahoe
16graph_info This graph shows the total amount of disk space used across the grid
17disk_used.label disk used
18disk_used.draw LINE1""")
19    sys.exit(0)
20
21url = os.environ["url"]
22data = json.load(urllib.urlopen(url))["used"]
23print("disk_used.value", data)
Note: See TracBrowser for help on using the repository browser.