source: trunk/misc/operations_helpers/munin/tahoe_diskleft

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: 756 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 free space
5# is left 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 Remaining Disk Space
14graph_vlabel bytes remaining
15graph_category tahoe
16graph_info This graph shows the total amount of disk space left available in the grid
17disk_left.label disk left
18disk_left.draw LINE1""")
19    sys.exit(0)
20
21url = os.environ["url"]
22data = json.load(urllib.urlopen(url))["available"]
23print("disk_left.value", data)
Note: See TracBrowser for help on using the repository browser.