tahoe-lafs/src/allmydata
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
..
gui confwiz: update to record install and uninstall events. 2008-01-30 16:52:07 -07:00
scripts cli scripts: remove the for-educational-purposes standalone clauses. Closes #261. 2008-01-16 00:08:51 -07:00
test upload: oops, fix breakage after removing upload_file/upload_data/etc 2008-01-30 19:41:43 -07:00
util log.py: update log.err() to take advantage of current foolscap's log.err 2008-01-30 18:47:23 -07:00
web display the Helper FURL and our connection status on the welcome page. Closes #285. 2008-01-28 13:56:22 -07:00
windows move registry module into allmydata.windows package 2008-01-10 19:03:23 -07:00
__init__.py setup: require specific versions of dependencies, both at run-time (if pkg_resources is available) and at build-time, and make there be only once place where we specify those versions 2008-01-22 17:24:33 -07:00
checker.py checker: improve test coverage a little bit 2007-12-04 18:00:12 -07:00
client.py stats: add a simple stats gathering system 2008-01-30 20:11:07 -07:00
codec.py allow the introducer to set default encoding parameters. Closes #84. 2007-07-12 15:33:30 -07:00
control.py remove upload.upload_(data,filename,filehandle) convenience functions 2008-01-30 19:03:19 -07:00
debugshell.py finish storage server and write new download 2007-03-30 10:52:19 -07:00
dirnode.py remove wait_for_numpeers and the when_enough_peers call in mutable.Publish 2008-01-14 14:55:59 -07:00
download.py offloaded: improve logging across the board 2008-01-17 01:11:35 -07:00
encode.py encode.py: update logging levels 2008-01-28 12:15:27 -07:00
filenode.py test_mutable: improve test coverage a bit, add test_filenode.py 2007-12-03 21:37:54 -07:00
hashtree.py move almost all hashing to SHA256, consolidate into hashutil.py 2007-06-07 21:47:21 -07:00
interfaces.py stats: add a simple stats gathering system 2008-01-30 20:11:07 -07:00
introducer.py fix import error, detected thanks to "make test" 2007-12-11 17:23:01 -07:00
manhole.py trailing-whitespace eradication, no functional changes 2007-11-01 15:22:41 -07:00
mutable.py remove wait_for_numpeers and the when_enough_peers call in mutable.Publish 2008-01-14 14:55:59 -07:00
node.py node.py: when calling os.abort(), announce it to stdout as well as the log 2008-01-16 03:01:32 -07:00
offloaded.py upload-helper: avoid duplicate uploads: check the grid to see if the file already exists 2008-01-30 18:49:02 -07:00
provisioning.py added tweaked sibpath implementation 2008-01-10 15:23:41 -07:00
stats.py stats: add a simple stats gathering system 2008-01-30 20:11:07 -07:00
storage.py stats: add a simple stats gathering system 2008-01-30 20:11:07 -07:00
upload.py remove upload.upload_(data,filename,filehandle) convenience functions 2008-01-30 19:03:19 -07:00
uri.py added is_uri() function to allmydata.uri 2008-01-10 20:43:42 -07:00
webish.py webish: remove 'URI-link' from directory page, now that we only use URI-links 2008-01-29 18:11:09 -07:00