{ "info": { "author": "Timothy Van Heest", "author_email": "timothy@ionic.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: System :: Monitoring" ], "description": "# Prometheus Roller\n[![Build Status](https://travis-ci.org/turtlemonvh/prometheus_python_roller.png?branch=master)](https://travis-ci.org/turtlemonvh/prometheus_python_roller)\n[![PyPI version](https://img.shields.io/pypi/v/prometheus_roller.svg)](https://pypi.python.org/pypi/prometheus_roller)\n[![Downloads](http://img.shields.io/pypi/dm/prometheus_roller.svg)](https://pypi.python.org/pypi/prometheus_roller)\n[![Python versions](https://img.shields.io/pypi/pyversions/prometheus_roller.svg)](https://pypi.python.org/pypi/prometheus_roller)\n[![License](https://img.shields.io/pypi/l/prometheus_roller.svg)](https://pypi.python.org/pypi/prometheus_roller)\n\n\nThis is a small helper utility for creating time-boxed rollups for histogram and counter metrics created using the [prometheus python client](https://github.com/prometheus/client_python).\n\nMetrics like counters and histograms increase indefinitely, but you usually care about recent activity. This library provides a way to turn a counter or histogram into a gauge or set of gauges that give instantaneous measures of the state of the application.\n\nThis isn't very useful if you're using [the prometheus server](https://github.com/prometheus/prometheus) since it provides [functions to do that for you](https://prometheus.io/docs/querying/functions/), but if you are sending metrics to multiple places (e.g. [check_mk](https://mathias-kettner.de/checkmk_localchecks.html)) and you want to send those metrics in a form that make basic alerting and reporting easier, this may help.\n\n## Usage\n\n```python\nfrom prometheus_client import Histogram, Counter\nfrom prometheus_roller import HistogramRoller, CounterRoller, start_update_daemon\n\n# Create a histogram\nh = Histogram('test_value', 'Testing roller')\n\n# Create a counter\nc = Counter('test_counted_value', 'Testing roller')\n\n# Create a roller for the histogram, which calculates windowed values.\n# By default it will create a gauge with a label for each histogram bin.\n# The value of each gauge will be the change in value over the last 5 minutes, updated every 5 seconds.\n# See the `options` parameter for more configuration options.\nrh = HistogramRoller(h)\n\n# Create a roller for the counter, which calculates windowed values.\n# The value of each gauge will be the change in value over the last 5 minutes, updated every 5 seconds.\n# See the `options` parameter for more configuration options.\nrc = CounterRoller(c)\n\n# Launch a daemon thread tracking and updating all roller objects.\n# See the code for more options for configuring this update process.\nstart_update_daemon()\n```\n\n## Installation\n\n```bash\n# Install with pip\npip install prometheus_roller\n\n# To install as editable to work on it\npip install -e git+https://github.com/turtlemonvh/prometheus_python_roller.git#egg=prometheus_python_roller\n# OR\ngit clone git@github.com:turtlemonvh/prometheus_python_roller.git prometheus-roller\ncd prometheus-roller\npython setup.py develop\n```\n\n## Running tests\n\n```bash\n# Plain old python\npython -m unittest discover\n\n# If you have nose and coverage installed\nnosetests --with-cover\n```\n\n## TODO\n\n* Add IQR reducer", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/turtlemonvh/prometheus_python_roller", "keywords": "prometheus monitoring client metrics", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "prometheus_roller", "package_url": "https://pypi.org/project/prometheus_roller/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/prometheus_roller/", "project_urls": { "Homepage": "https://github.com/turtlemonvh/prometheus_python_roller" }, "release_url": "https://pypi.org/project/prometheus_roller/0.0.2/", "requires_dist": [ "prometheus-client" ], "requires_python": "", "summary": "Library for aggregating metrics from the Prometheus monitoring system's python client library.", "version": "0.0.2" }, "last_serial": 2023817, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "f81d8b3af3b225886bf74b5811497ea5", "sha256": "2aa620d66bc2becd1e5dc3500b0e105f2b1363d20eb390152dacc52e533f8350" }, "downloads": -1, "filename": "prometheus_roller-0.0.1-py2.7.egg", "has_sig": false, "md5_digest": "f81d8b3af3b225886bf74b5811497ea5", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 6592, "upload_time": "2016-03-22T15:19:54", "url": "https://files.pythonhosted.org/packages/e3/84/0fdf436c75198846f98af46f223aa1f1c5cc96bf88b3726d5ad7d5cc3218/prometheus_roller-0.0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "cf83267b412ee872854bb6aa9182bac3", "sha256": "fff0ddd13f96095141fdc86fa10a2514f624819c0d49749ce3dc760f812a6b18" }, "downloads": -1, "filename": "prometheus_roller-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cf83267b412ee872854bb6aa9182bac3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8657, "upload_time": "2016-03-22T15:19:45", "url": "https://files.pythonhosted.org/packages/2c/da/27dde855903f2379d5a4d27001236d1ff45d2a916b2c076d2c9e2c028a74/prometheus_roller-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eae74c5d17e47e852893afc4363083c0", "sha256": "2621917216600bf7df18e1628c8a38958d6448e7f1ca3073a9c4eaf2738fdc09" }, "downloads": -1, "filename": "prometheus_roller-0.0.1.tar.gz", "has_sig": false, "md5_digest": "eae74c5d17e47e852893afc4363083c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5539, "upload_time": "2016-03-22T15:20:01", "url": "https://files.pythonhosted.org/packages/1c/b4/eeb26a122cd7d0a23be0a08d4604993bc85f39413c0e39be944798dec4ad/prometheus_roller-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "97dbfb8338ab88418a4a61cf9802b756", "sha256": "92329c4b91052c0c3b7f298202ee06fef8f425e07424f4c4388ea7b3222b1ef1" }, "downloads": -1, "filename": "prometheus_roller-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "97dbfb8338ab88418a4a61cf9802b756", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8829, "upload_time": "2016-03-23T23:07:56", "url": "https://files.pythonhosted.org/packages/30/26/47e130ba9bce65fe717076b61d43117958b0fe356cbfb7ec554133c930f9/prometheus_roller-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "050c36af795b1bfabcbd26688de0cdb8", "sha256": "2aed11873c7b2bef7882fd6f6bc86c09aa8ddeff59c82ec102e07fe475e416d6" }, "downloads": -1, "filename": "prometheus_roller-0.0.2.tar.gz", "has_sig": false, "md5_digest": "050c36af795b1bfabcbd26688de0cdb8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5627, "upload_time": "2016-03-23T23:08:17", "url": "https://files.pythonhosted.org/packages/37/f6/37dcf601f38d3a8fa51374359facc63a599629e88226a57d85f54147d21c/prometheus_roller-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "97dbfb8338ab88418a4a61cf9802b756", "sha256": "92329c4b91052c0c3b7f298202ee06fef8f425e07424f4c4388ea7b3222b1ef1" }, "downloads": -1, "filename": "prometheus_roller-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "97dbfb8338ab88418a4a61cf9802b756", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8829, "upload_time": "2016-03-23T23:07:56", "url": "https://files.pythonhosted.org/packages/30/26/47e130ba9bce65fe717076b61d43117958b0fe356cbfb7ec554133c930f9/prometheus_roller-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "050c36af795b1bfabcbd26688de0cdb8", "sha256": "2aed11873c7b2bef7882fd6f6bc86c09aa8ddeff59c82ec102e07fe475e416d6" }, "downloads": -1, "filename": "prometheus_roller-0.0.2.tar.gz", "has_sig": false, "md5_digest": "050c36af795b1bfabcbd26688de0cdb8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5627, "upload_time": "2016-03-23T23:08:17", "url": "https://files.pythonhosted.org/packages/37/f6/37dcf601f38d3a8fa51374359facc63a599629e88226a57d85f54147d21c/prometheus_roller-0.0.2.tar.gz" } ] }