Zesty metrics collection and Statsd integration for Django.
Project description
Introduction
django-zesty-metrics is a middleware suite that uses statsd to report important metrics to a StatD server.
Out of the box, it will track:
response times individually by view, and in aggregate
aggregate user activity data
Requirements
Installation
To install simply execute python setup.py install.
Configuration
In your Django settings:
Add zesty_metrics to the INSTALLED_APPS
Add zesty_metrics.middleware.MetricsMiddleware to MIDDLEWARE_CLASSES
Set the following, as needed: - STATSD_HOST, default localhost - STATSD_PORT, default 8125 - STATSD_PREFIX, default None - ZESTY_TRACKING_CLASSES, default ('zesty_metrics.tracking.UserAccounts',)
Run syncdb (or migrate if you use South).
Set up a cron job to run the report_metrics django-admin.py command regularly. At least once a day, but you can update it as often as you want. This command reports metrics from the trackers that you configure in ZESTY_TRACKING_CLASSES.
If you want to send metrics from the client-side, hook up the default URLs in your urls.py:
urlpatterns = patterns( '', url(r'^metrics/', include('zesty_metrics.urls')), )
Acknowledgements
Lots of ideas were taken from django-statsd and django-munin.
CHANGELOG
0.1.1: Fixed “NO VALUE” error in report_metrics command when values were pulled from the cache.
0.1: Initial release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for django-zesty-metrics-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7871b9dea95b39eec253f9f7c7468f1a9babf60d01624087918e54b7413a5f5b |
|
MD5 | 338e1399c35bc0727acfe9697a5208b5 |
|
BLAKE2b-256 | 8b07bc5aea9cf6ea27cb3cb64928ab5bff81d6afb10c59ea2844eefaff7cd5fe |