{ "info": { "author": "Matwey V. Kornilov", "author_email": "matwey.kornilov@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# django-collectd-rest\n\n[![Build Status](https://travis-ci.org/matwey/django-collectd-rest.svg?branch=master)](https://travis-ci.org/matwey/django-collectd-rest)\n[![PyPI version](https://badge.fury.io/py/django-collectd-rest.svg)](https://badge.fury.io/py/django-collectd-rest)\n\ndjango-collectd-rest is a simple [Django] application to demonstrate RRD plots generated by [collectd] or any other [rrd] data. The application is built on top of [django-rest-framework] and provides REST API to access the plots.\n\nThere are two major things in django-collectd-rest, *graphs* are grouped into *groups*. Both the graphs and the groups are accessible through REST API. Using mutable access (POST, PUT, DELETE), you can configure you hierarchy, create new graphs or alter existing ones. You also can grab meta-info or ready PNG images by means of GET requests. Genuine ```rrdtool``` is currently used to render the plots.\n\nNewly introduced *granularity* object is a kind of policy hinting image freshness lifetime, or its time resolution. Currently, it is used to correctly set `max-age` in response `Cache-Control` header. The default granularity has `max-age=0`.\n\n## Installation\n\nThe following prerequisites are required to operate django-collectd-rest:\n* [django-rest-framework] - powerful and flexible toolkit that makes it easy to build Web APIs.\n* [rrd] - high performance data logging and graphing system for time series data.\n\nTo use django-collectd-rest in your django project, include the following code into your ```settings.py```:\n```python\nINSTALLED_APPS = (\n #...\n 'rest_framework',\n 'collectd_rest',\n)\n```\n\nInto your ```urls.py``` you have to add the following:\n```python\nurlpatterns = patterns('',\n #...\n url(r'^collectd_rest/', include('collectd_rest.urls')),\n)\n```\n\n## Configuration\nThe whole configuration is stored into the project database, there is not separate dedicated configfile. New graphs and groups are added by creating new objects. The latter can be done in different ways.\n\nUsing django database console:\n```python\nfrom collectd_rest import models\ngroup = models.GraphGroup(title=\"The Group\", name=\"group1\")\ngroup.save()\ngraph = models.Graph(title=\"The Graph\", name=\"graph1\", priority=0, command=\"DEF:cpuuser=/path/to/rrd/cpu-0/cpu-idle.rrd:value:AVERAGE LINE2:cpuuser#000000:legend\", group=group)\ngraph.save()\n```\n\nThe ```GraphGroup``` model has two parameters: human-readable ```title``` and lookup field ```name``` to access the group by url like ```http://example.com/collectd_rest/group/{name}/```.\nThe ```Graph``` model has way more fields, including ```priority``` to sort the graphs inside one group, mandatory parent ```group```, and ```command``` to generate rrd plot.\n\nThe other ways to configure the application are Django fixtures, Django admin interface, [django-rest-framework] web browsable interface, and REST API itself. You can also modify the graphs hierarchy dynamically by means of custom REST client.\n\n## Authentication and permissions\nYou may utilise all possible options provided by [django-rest-framework]. See [Tutorial](http://www.django-rest-framework.org/tutorial/4-authentication-and-permissions/) for reference.\n\n## Caching\nYou may utilise all caching mechanisms provided by [Django] framework. See [Django's cache framework](https://docs.djangoproject.com/en/dev/topics/cache/).\n\n## Using\nTo demonstrate how the framework can be used, let's look at the following JavaScript code ([jQuery] is used here). The following code renders the group names ```mygroup``` into corresponding ```div``` element, and the ```myothergroup``` into the other one.\n```HTML\n\n\n\n\n\n\n
\n
\n
\n
\n\n\n```\n\n## Feedback\nIf you have any questions, issues, or pull-requests, you are welcome to use GitHub infrastructure for them.\n\n## License\n\nCopyright (c) 2014, Matwey V. Kornilov\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n[Django]:https://www.djangoproject.com/\n[collectd]:https://collectd.org/\n[rrd]:http://oss.oetiker.ch/rrdtool/\n[django-rest-framework]:http://www.django-rest-framework.org\n[jQuery]:http://jquery.com/", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/matwey/django-collectd-rest", "keywords": "", "license": "BSD-2-Clause", "maintainer": "", "maintainer_email": "", "name": "django-collectd-rest", "package_url": "https://pypi.org/project/django-collectd-rest/", "platform": "", "project_url": "https://pypi.org/project/django-collectd-rest/", "project_urls": { "Homepage": "https://github.com/matwey/django-collectd-rest" }, "release_url": "https://pypi.org/project/django-collectd-rest/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "A simple Django application to demonstrate RRD plots generated by collectd or any other rrd data", "version": "0.2.0" }, "last_serial": 3596363, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "4af91b44944b1e6d1c92980e0a8c48ce", "sha256": "8774d24bd456baa9472e1d501f704731816259cfcf63136680868ae487ace228" }, "downloads": -1, "filename": "django-collectd-rest-0.1.tar.gz", "has_sig": false, "md5_digest": "4af91b44944b1e6d1c92980e0a8c48ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5146, "upload_time": "2014-11-26T20:41:00", "url": "https://files.pythonhosted.org/packages/31/89/e49c669adc028b016098ad52006dd69425c093a71039ede84547b0170d07/django-collectd-rest-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "6643eabd3a2e599ee4ed5d01b8ddbc28", "sha256": "084176bb7b9099993fd05e0db1483d9b54b7caf6549a23d16cbfbc7829064422" }, "downloads": -1, "filename": "django-collectd-rest-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6643eabd3a2e599ee4ed5d01b8ddbc28", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5304, "upload_time": "2014-12-03T18:01:25", "url": "https://files.pythonhosted.org/packages/66/17/03acff1f25a939d48889856a9f28c5156daf6e1ff4c32edbf90b69d4e15b/django-collectd-rest-0.1.1.tar.gz" } ], "0.1.10": [ { "comment_text": "", "digests": { "md5": "65d291f64d15a77dd4ac253a2cfa97a1", "sha256": "b3720f34f35e47a98aba811923638746e4f423bac9185621ea2a84e544a3798c" }, "downloads": -1, "filename": "django-collectd-rest-0.1.10.tar.gz", "has_sig": false, "md5_digest": "65d291f64d15a77dd4ac253a2cfa97a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8013, "upload_time": "2017-12-23T16:54:56", "url": "https://files.pythonhosted.org/packages/bd/10/a35afaea5a6814377c3fdafa7beedbdd6e31d85fb41354fb7f0815741ccb/django-collectd-rest-0.1.10.tar.gz" } ], "0.1.11": [ { "comment_text": "", "digests": { "md5": "82af9155cb327886081d5465ac457676", "sha256": "cbe9d941659f752da85a024151e892b8109dbc30c1f159e0a76213c518730bb8" }, "downloads": -1, "filename": "django-collectd-rest-0.1.11.tar.gz", "has_sig": false, "md5_digest": "82af9155cb327886081d5465ac457676", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9292, "upload_time": "2018-01-19T09:43:59", "url": "https://files.pythonhosted.org/packages/dc/fe/38c5eae5878e93aaacb6a9fe804a36cde06f480978e3038976a4a6a1272f/django-collectd-rest-0.1.11.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "04bdb144482a9e5b49d51b21baf97445", "sha256": "0acb457f9baa221451361535bc6b7c77a05e81db679a51c625f000c2b90de397" }, "downloads": -1, "filename": "django-collectd-rest-0.1.2.tar.gz", "has_sig": false, "md5_digest": "04bdb144482a9e5b49d51b21baf97445", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6465, "upload_time": "2014-12-05T08:34:33", "url": "https://files.pythonhosted.org/packages/6b/a7/c02779cb310bcc5610f246e6f81743f21db202e5182ba249d972e9c5b79b/django-collectd-rest-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "d9d94c30744b64776f829a8f8f9b08a0", "sha256": "10f0b3e786aad0ae58c3e89d85816b8137c2b957dea85ee912b57d7bfe259338" }, "downloads": -1, "filename": "django-collectd-rest-0.1.3.tar.gz", "has_sig": false, "md5_digest": "d9d94c30744b64776f829a8f8f9b08a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6676, "upload_time": "2014-12-05T08:44:46", "url": "https://files.pythonhosted.org/packages/e8/cd/7fb6530ac18c6d194d302874f7a691c75d736f0fed3024089596871b652c/django-collectd-rest-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "ae3b707bb74680bb8e07754036459077", "sha256": "7fcf7b84a5d70ab3fa928fc3cdadc4f25a420be915323aeb01cb7f60e8d2a01e" }, "downloads": -1, "filename": "django-collectd-rest-0.1.4.tar.gz", "has_sig": false, "md5_digest": "ae3b707bb74680bb8e07754036459077", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7072, "upload_time": "2014-12-06T17:59:25", "url": "https://files.pythonhosted.org/packages/4f/4a/1c229d7691fbf0cd90d8826f967848decffa5b46e0b577ffcd8fefc9f6f2/django-collectd-rest-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "2bb77b7f13412b576ddef03bb7ed0dd0", "sha256": "47c3e9ce1169eedad334e2efce34359a2d0eca9ed77a46e6acc353cf9831cc2d" }, "downloads": -1, "filename": "django-collectd-rest-0.1.5.tar.gz", "has_sig": false, "md5_digest": "2bb77b7f13412b576ddef03bb7ed0dd0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7100, "upload_time": "2014-12-08T10:55:07", "url": "https://files.pythonhosted.org/packages/8c/e9/dc909d50803815faf697a5dee37cdcfb51a3042295ea43cfb122dcb610ff/django-collectd-rest-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "950912cb7ad3ef4cd23c09b3e4dea09d", "sha256": "c9b2b8e3511ee29c413096c86cdbf2832398c9017ea7d892aa77269b34b6bbec" }, "downloads": -1, "filename": "django-collectd-rest-0.1.6.tar.gz", "has_sig": false, "md5_digest": "950912cb7ad3ef4cd23c09b3e4dea09d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7946, "upload_time": "2014-12-20T13:02:42", "url": "https://files.pythonhosted.org/packages/f8/41/951bb1830b527f70a5a0318546b97adf273d869e96dea4073b3501a9a849/django-collectd-rest-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "39c080d98e19c48c408fb01b90b64766", "sha256": "9293b613484b8bbbd977ca9a633de27708373de6d064d14dc4ea52b62d070d19" }, "downloads": -1, "filename": "django-collectd-rest-0.1.7.tar.gz", "has_sig": false, "md5_digest": "39c080d98e19c48c408fb01b90b64766", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7958, "upload_time": "2015-01-18T18:51:13", "url": "https://files.pythonhosted.org/packages/28/1d/301ed5560b9be6f2d00f967243fc4c5c6e8460bb0623dec0d116f38c0861/django-collectd-rest-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "a20ffe757d8453da9101c711b1cce1b1", "sha256": "1c9546446462ed898b7a58d6b3826e352565ed9422a9681787a2e438ab2a600c" }, "downloads": -1, "filename": "django-collectd-rest-0.1.8.tar.gz", "has_sig": false, "md5_digest": "a20ffe757d8453da9101c711b1cce1b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8007, "upload_time": "2016-02-23T13:34:50", "url": "https://files.pythonhosted.org/packages/5d/90/48ecbfce09251585dec1b76184dbeb87bd06e0df85103e82007f01bb77f6/django-collectd-rest-0.1.8.tar.gz" } ], "0.1.9.1": [ { "comment_text": "", "digests": { "md5": "c8c738b4e3fe69319baa0cc14d53201c", "sha256": "489d8cf5fef0dec4017c87ed2c7ce0c6a37785910bb2e6a76ad500147243e99b" }, "downloads": -1, "filename": "django-collectd-rest-0.1.9.1.tar.gz", "has_sig": false, "md5_digest": "c8c738b4e3fe69319baa0cc14d53201c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8451, "upload_time": "2016-04-02T14:01:49", "url": "https://files.pythonhosted.org/packages/f0/70/a876834da5c53bfd141c957a4ceb0d2eac758077e098b00b47d432e30184/django-collectd-rest-0.1.9.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "12bd712f4c4272861c28ca3c25e16e85", "sha256": "5e016df821334bd605d293a8547356556a56fc0d422eac4633f0ce8d7bc4b852" }, "downloads": -1, "filename": "django-collectd-rest-0.2.0.tar.gz", "has_sig": false, "md5_digest": "12bd712f4c4272861c28ca3c25e16e85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14514, "upload_time": "2018-02-19T16:11:18", "url": "https://files.pythonhosted.org/packages/6d/77/ce8ce7749a102b223f7e26c3805bfbc02113e3eccc481a24e2fab11152af/django-collectd-rest-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "12bd712f4c4272861c28ca3c25e16e85", "sha256": "5e016df821334bd605d293a8547356556a56fc0d422eac4633f0ce8d7bc4b852" }, "downloads": -1, "filename": "django-collectd-rest-0.2.0.tar.gz", "has_sig": false, "md5_digest": "12bd712f4c4272861c28ca3c25e16e85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14514, "upload_time": "2018-02-19T16:11:18", "url": "https://files.pythonhosted.org/packages/6d/77/ce8ce7749a102b223f7e26c3805bfbc02113e3eccc481a24e2fab11152af/django-collectd-rest-0.2.0.tar.gz" } ] }