if a node fails to report stats, the natural thing to do in re munin is to
supress the data for that data series. the previous tahoe-stats would output
whatever data was present in the stats_gatherer's stats.pickle, regardless of
how old.
this change means that if the gatherer hasn't received data within the last
5 min, then no data is reported to munin for that node.
import pickle
import re
import sys
+import time
+
+STAT_VALIDITY = 300 # 5min limit on reporting stats
PLUGINS = {
'tahoe_storage_consumed':
stats = open_stats(stats_file)
+ now = time.time()
def output_nodes(output_section):
for tubid, nodestats in stats.items():
+ if (now - nodestats.get('timestamp', 0)) > STAT_VALIDITY:
+ continue
name = smash_name("%s_%s" % (nodestats['nickname'], tubid[:4]))
#value = nodestats['stats'][plugin_conf['category']].get(plugin_conf['statid'])
category = plugin_conf['category']