Commit Graph

12 Commits

Author SHA1 Message Date
robk-tahoe
3641b7924b munin stats: don't suppress series with no current data
having changed tahoe-stats to not report data series if there was no recent
data recorded for a node, I wound up making it hide the data series.  this
change causes it to report all data series for which stats exist in the
'config' phase, so that they show up, but only report actual data if the
stats are recent, so that they show up as missing if the node is not
reporting stats currently
2008-02-01 18:44:57 -07:00
robk-tahoe
b80cfeb186 munin stats: suppress output of data more that 5min old
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.
2008-01-31 21:04:23 -07:00
robk-tahoe
e910a64e7d munin stats: change truncated nodeid to 4 char (not 8) 2008-01-31 19:21:17 -07:00
robk-tahoe
7b9f3207d0 stats: add a simple stats gathering system
We have a desire to collect runtime statistics from multiple nodes primarily
for server monitoring purposes.   This implements a simple implementation of
such a system, as a skeleton to build more sophistication upon.

Each client now looks for a 'stats_gatherer.furl' config file.  If it has
been configured to use a stats gatherer, then it instantiates internally
a StatsProvider.  This is a central place for code which wishes to offer
stats up for monitoring to report them to, either by calling 
stats_provider.count('stat.name', value) to increment a counter, or by
registering a class as a stats producer with sp.register_producer(obj).

The StatsProvider connects to the StatsGatherer server and provides its
provider upon startup.  The StatsGatherer is then responsible for polling
the attached providers periodically to retrieve the data provided.
The provider queries each registered producer when the gatherer queries
the provider.  Both the internal 'counters' and the queried 'stats' are
then reported to the gatherer.

This provides a simple gatherer app, (c.f. make stats-gatherer-run)
which prints its furl and listens for incoming connections.  Once a
minute, the gatherer polls all connected providers, and writes the
retrieved data into a pickle file.

Also included is a munin plugin which knows how to read the gatherer's
stats.pickle and output data munin can interpret.  this plugin, 
tahoe-stats.py can be symlinked as multiple different names within
munin's 'plugins' directory, and inspects argv to determine which
data to display, doing a lookup in a table within that file.
It looks in the environment for 'statsfile' to determine the path to
the gatherer's stats.pickle.  An example plugins-conf.d file is
provided.
2008-01-30 20:11:07 -07:00
Brian Warner
475a58fcc5 munin: add a sample file for /etc/munin/plugin-conf.d/ 2007-10-22 15:08:39 -07:00
Brian Warner
0aba63ff17 munin: oops, fix that trailing-newline fix, the previous one mangled the config 2007-10-18 12:49:22 -07:00
Brian Warner
b339c76560 munin: remove extra blank line from config output 2007-10-18 12:39:26 -07:00
Brian Warner
33a02e19f1 munin: update shareholder plugins to match current storage layout 2007-10-18 12:08:58 -07:00
Brian Warner
bd49bafb23 munin/tahoe-sharesperfile: don't truncate to an int, emit a float instead 2007-08-23 16:31:15 -07:00
Brian Warner
b25446d514 munin/tahoe-storagespace.py: use /bin/du instead of our python version, since
it a) is faster and b) will include filesystem overhead that is a real cost.
2007-08-09 18:26:57 -07:00
Brian Warner
cb890cb9e4 munin plugins: fix labels 2007-07-05 14:38:31 -07:00
Brian Warner
8b2f0ef44c add some munin plugins 2007-07-05 13:38:15 -07:00