{ "info": { "author": "Nathan Jennings", "author_email": "natej.git@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Copyright (c) 2017 the Timera authors and contributors .\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this\nsoftware and associated documentation files (the \"Software\"), to deal in the Software\nwithout restriction, including without limitation the rights to use, copy, modify, merge,\npublish, distribute, sublicense, and/or sell copies of the Software, and to permit persons\nto whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or\nsubstantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\nINCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\nPURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE\nFOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\nDEALINGS IN THE SOFTWARE.\n\nPortions of the code marked as \"stolen from Paste\" are provided under the\nfollowing license:\n\n Copyright (c) 2005 Ian Bicking and Contributors\n\n Permission is hereby granted, free of charge, to any person obtaining\n a copy of this software and associated documentation files (the\n \"Software\"), to deal in the Software without restriction, including\n without limitation the rights to use, copy, modify, merge, publish,\n distribute, sublicense, and/or sell copies of the Software, and to\n permit persons to whom the Software is furnished to do so, subject to\n the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nDescription: Timera\n ======\n \n Store metrics in InfluxDB.\n \n .. figure:: docs/img/plugin-httptimer-grafana-dashboard-1.png\n :scale: 50 %\n :alt: Grafana Dashboard\n \n Grafana Dashboard\n \n There's currently one plugin included with Timera, ``httptimer``.\n \n With ``httptimer``, you can store the time it takes to get http responses. For example:\n \n .. code-block:: ini\n \n [httptimer_plugin_01]\n name = www.google.com\n url = https://www.google.com/\n proxy = http://proxy.example.com:3128/\n include_direct = true\n \n See the config file, `config.ini `_, for options.\n \n Use any InfluxDB-compatible visualization software to view your metrics. For example:\n \n - `Chronograf `_\n - `Grafana `_\n \n Plugins\n -------\n \n Timera has a simple plugin system. So it's easy to write your own plugin to collect and store the metrics you want.\n See the custom plugin below and the included plugin\n `httptimer `_ for examples.\n \n Config file:\n \n .. code-block:: ini\n \n [mymetrics_plugin_01]\n plugin_import = mymetrics.metrics\n name = cpu_load_short\n field = value\n \n ``mymetrics/metrics.py``:\n \n .. code-block:: python\n \n import logging\n import timera\n \n log = logging.getLogger(__name__)\n \n def get_metrics(config, timestamp, plugin):\n \"\"\"\n :param config: ConfigParser instance\n :param timestamp: unix timestamp (seconds since epoch) for current collection interval\n :param plugin: dict with parsed plugin values\n \"\"\"\n measurement = plugin['config']['name']\n field = plugin['config']['field']\n metric = 0.64\n fields = {field: str(metric)}\n tags = {'host': 'server01', 'region': 'us-west'}\n log.info('%s %r: %s=%f' % (measurement, tags, field, metric))\n measurementd = dict(measurement=measurement, time=timestamp, fields=fields, tags=tags)\n idbc = timera.db.get_client(config)\n timera.db.write_points(idbc, [measurementd])\n \n If you create a plugin you think others would find useful, please submit a PR with tests for inclusion in Timera.\n \n Requirements\n ------------\n \n - `InfluxDB `_\n - `Python `_ 2.7 or 3.6, pip and setuptools.\n \n Install\n -------\n \n .. code-block:: bash\n \n $ pip install timera\n \n Or if using a virtual environment:\n \n .. code-block:: bash\n \n $ source env/bin/activate\n $ pip install timera\n \n Development Install\n -------------------\n \n Use ``make install-dev`` to install in editable mode (``pip install -e .``) with pytest and tox:\n \n .. code-block:: bash\n \n $ source env/bin/activate\n $ cd timera-master\n $ make install-dev\n $ make test\n $ tox\n \n Run It\n ------\n \n Create db and start collecting metrics:\n \n .. code-block:: bash\n \n # edit config.ini\n $ timera config.ini reset_db\n $ timera config.ini start\n \n Optional\n --------\n \n Use `Supervisor `_ to run Timera. See the\n `contrib dir `_. Supervisor requires\n Python 2 (``pip install supervisor``).\n \n Viewing Metrics with Grafana\n ----------------------------\n \n Configure `InfluxDB as a datasource `_.\n \n For the ``httptimer`` plugin, create a `graph panel `_ and\n configure the query:\n \n .. figure:: docs/img/plugin-httptimer-grafana-metrics-tab-1.png\n :scale: 50 %\n :alt: Grafana Metrics Tab\n \n Grafana Metrics Tab\n \n Changes\n -------\n \n See `CHANGES.rst `_.\n \n License\n -------\n \n Timera is provided under the MIT License. See `LICENSE.txt `_.\n \nKeywords: influxdb system network monitoring\nPlatform: UNKNOWN\nClassifier: Development Status :: 4 - Beta\nClassifier: Topic :: Database\nClassifier: Topic :: System :: Monitoring\nClassifier: Topic :: System :: Networking :: Monitoring\nClassifier: Topic :: System :: Systems Administration\nClassifier: License :: OSI Approved :: MIT License\nClassifier: Programming Language :: Python :: 2\nClassifier: Programming Language :: Python :: 2.7\nClassifier: Programming Language :: Python :: 3\nClassifier: Programming Language :: Python :: 3.6\nClassifier: Operating System :: Microsoft :: Windows\nClassifier: Operating System :: POSIX\nRequires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/natej/timera", "keywords": "", "license": "This is the MIT License: https://opensource.org/licenses/MIT", "maintainer": "", "maintainer_email": "", "name": "timera", "package_url": "https://pypi.org/project/timera/", "platform": "", "project_url": "https://pypi.org/project/timera/", "project_urls": { "Homepage": "https://github.com/natej/timera" }, "release_url": "https://pypi.org/project/timera/0.2.1/", "requires_dist": [ "influxdb (>=4.1.0)", "requests (>=2.15.0)" ], "requires_python": "", "summary": "Store metrics in InfluxDB.", "version": "0.2.1" }, "last_serial": 2943318, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9a697dfd66d9f894017ef295dd1155e5", "sha256": "8a96e8ba8f845e0f5a9958e63702ed3aaa071e6138647d6eabff795b896b4510" }, "downloads": -1, "filename": "timera-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9a697dfd66d9f894017ef295dd1155e5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15879, "upload_time": "2017-06-06T06:41:35", "url": "https://files.pythonhosted.org/packages/ae/a3/ec5d326038d3397a4f47c091577183972b10337fba77b5b54e3e17c0084c/timera-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d251d33399c466350669ed601bdaeeb", "sha256": "5b869512d6b9523bbb927c4b78069f0e9a4f0c1214ca2a840fac21743677759d" }, "downloads": -1, "filename": "timera-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3d251d33399c466350669ed601bdaeeb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11734, "upload_time": "2017-06-06T06:41:36", "url": "https://files.pythonhosted.org/packages/e5/38/5c8ff32863b32476e2ce2a1b9abf6280a4ad2cde8727b24d62fbca0fd919/timera-0.1.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "eb0ed49accce1b8b43ec88ec973ffba3", "sha256": "7e6073847014248f4f6180220f273baa5028329771ee141f5321f17e2bc9c8b0" }, "downloads": -1, "filename": "timera-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eb0ed49accce1b8b43ec88ec973ffba3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17422, "upload_time": "2017-06-12T06:19:51", "url": "https://files.pythonhosted.org/packages/12/20/e99a804097cf25729e87d0fbd551b9493b1f4b2fac19d24e6a3d7116deb9/timera-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "01d3345a96166a0bfe3b9529e0d5159e", "sha256": "b100f0e266565edc050128a746604629ecef1da6dd08b67845d5b96e520097ea" }, "downloads": -1, "filename": "timera-0.2.1.tar.gz", "has_sig": false, "md5_digest": "01d3345a96166a0bfe3b9529e0d5159e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12875, "upload_time": "2017-06-12T06:19:52", "url": "https://files.pythonhosted.org/packages/eb/4c/90f795932f882ca4aaf35e8282c7bd3547dcf5245cc21d6fffa95fdd24dd/timera-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "eb0ed49accce1b8b43ec88ec973ffba3", "sha256": "7e6073847014248f4f6180220f273baa5028329771ee141f5321f17e2bc9c8b0" }, "downloads": -1, "filename": "timera-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "eb0ed49accce1b8b43ec88ec973ffba3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 17422, "upload_time": "2017-06-12T06:19:51", "url": "https://files.pythonhosted.org/packages/12/20/e99a804097cf25729e87d0fbd551b9493b1f4b2fac19d24e6a3d7116deb9/timera-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "01d3345a96166a0bfe3b9529e0d5159e", "sha256": "b100f0e266565edc050128a746604629ecef1da6dd08b67845d5b96e520097ea" }, "downloads": -1, "filename": "timera-0.2.1.tar.gz", "has_sig": false, "md5_digest": "01d3345a96166a0bfe3b9529e0d5159e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12875, "upload_time": "2017-06-12T06:19:52", "url": "https://files.pythonhosted.org/packages/eb/4c/90f795932f882ca4aaf35e8282c7bd3547dcf5245cc21d6fffa95fdd24dd/timera-0.2.1.tar.gz" } ] }