From ef58425b8e5be5818884108c92bfb208cdb3d741 Mon Sep 17 00:00:00 2001 From: Dolph Mathews Date: Mon, 11 Jun 2012 16:09:27 -0500 Subject: Basic request stats monitoring & reporting Attributes are tracked seperately per interface (public API vs admin API): - Request method (GETs, POSTs, etc) - Requested resources - Number of requests per remote address - Response status codes Retrieve statistics report: GET http://keystone:35357/v2.0/OS-STATS/stats e.g. http://paste.openstack.org/raw/18528/ Reset statistics report: DELETE http://keystone:35357/v2.0/OS-STATS/stats Change-Id: Id21af755e5e25b8275dd55b7415bf4c421304807 --- doc/source/configuration.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'doc/source') diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index d7ddfe89..415ee539 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -151,6 +151,39 @@ choosing the output levels and formats. .. _Paste: http://pythonpaste.org/ .. _`python logging module`: http://docs.python.org/library/logging.html +Monitoring +---------- + +Keystone provides some basic request/response monitoring statistics out of the +box. + +Enable data collection by defining a ``stats_monitoring`` filter and including +it at the beginning of any desired WSGI pipelines:: + + [filter:stats_monitoring] + paste.filter_factory = keystone.contrib.stats:StatsMiddleware.factory + + [pipeline:public_api] + pipeline = stats_monitoring [...] public_service + +Enable the reporting of collected data by defining a ``stats_reporting`` filter +and including it near the end of your ``admin_api`` WSGI pipeline (After +``*_body`` middleware and before ``*_extension`` filters is recommended):: + + [filter:stats_reporting] + paste.filter_factory = keystone.contrib.stats:StatsExtension.factory + + [pipeline:admin_api] + pipeline = [...] json_body stats_reporting ec2_extension [...] admin_service + +Query the admin API for statistics using:: + + $ curl -H 'X-Auth-Token: ADMIN' http://localhost:35357/v2.0/OS-STATS/stats + +Reset collected data using:: + + $ curl -H 'X-Auth-Token: ADMIN' -X DELETE http://localhost:35357/v2.0/OS-STATS/stats + SSL --- -- cgit