{
"info": {
"author": "Wes Winham",
"author_email": "winhamwr@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 3 - Alpha",
"Framework :: Django",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": "Dbag- Easy time-series metrics and dashboarding \n===============================================\n\nDbag is a simple Django app to help you remember, graph and create dashboards\nfor arbitrary metrics that change over time. \n\nIt's best used to graph things like: \n\n* number of active user accounts\n* % of users who have logged in today\n* number of new blog comments\n \nThese are things that are easy to run a query or a quick bit of python to\ndetermine the answer to the question *right now* but that are hard or fuzzy to\ncalculate for periods in the past. You want to figure out your number every day\nand then remember it so you can display fancy graphs and trending (and you want\nthese graphs to just work and be pretty). You also want to reduce complexity by\nusing your existing Django database backend to hold all of the data.\n\nWhy Dbag?\n---------\n\nDbag fills a niche not currently well-covered by existing solutions. Dbag is\nsimpler than existing tools because it does less. If you meet the following \nconditions, it might be right for you:\n\n* You want to collect a small to moderate amount of data and daily resolution\n is good enough.\n* You have many different ways of getting the data, but you want to collect it\n from one place.\n* You want the simplicity of builtin metric types to get commonly-needed Django\n metrics, but you also want the flexibility to define arbitrary python\n functions to collect data.\n* You want simple dashboarding that you can use internally and expose to your\n users without a lot of work (and it should be pretty).\n* You want to be able to interact with your metrics via Django's ORM if necessary.\n* You want the option to tie a metric to a specific object in your database. If\n you have a `Customer` object, you might want the number of active accounts on\n each specific customer.\n\nWhat you should use instead\n---------------------------\n\nIf that's not what you're looking for, then one of the following is probably a\nbetter option.\n\nOperations and SysAdmin Graphing\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThere several great system information graphing applications like\n, `munin `_\nand `cacti `_ if you want to see CPU usage over time.\nThese are better if you want to know how disk usage is trending across 30\ndifferent nodes.\n\nCapture Events\n~~~~~~~~~~~~~~\n\n`Mixpanel `_, `statsd `_,\n`Google Analytics `_, etc are all better at\ncapturing events and high-frequency data. Use them if that's all you need. Dbag\nwould fit in to that equation if you want to regularly slice off or corelate\ndata from those sources and display the changes over time on a dashboard.\n\nGraph Anything\n~~~~~~~~~~~~~~\n\nIf you just want to dump any kind of data at any volume in to one system and\nthen graph it a thousand different ways, you should use\n`graphite `_. You'll want to put it on a different\nserver and you'll need to figure it out, but you'll get as much scalability and\nflexibility as you need. `dbag` actually works well in combination with\ngraphite if you'd like to display simple dashboards of summarized date to your\nusers.\n\nOther Django Dashboards\n~~~~~~~~~~~~~~~~~~~~~~~\n\nThere are some other Django dashboarding-ish apps around.\n\n* This one isn't meant to be general-purpose, but is used specifically for\n grabbing metrics for the `Django project\n dashboard `_. It has very\n attractive panels with a optional sparklines and a nice master/default\n layout. Visual inspiration was taken heavily from this project and `dbag` can\n be used to effectively recreate the Django project dashboard..\n* This sub-project in\n `djutils `_\n effectively re-creates Munin using Django. It allows you to collect and\n aggregate very granular data using whatever python code you'd like. It does\n not however let you create parameterized panels and metrics (meaning that if\n you wanted to create separate panels for every ``Customer`` in your database,\n you'd need to write python code registering a panel for each customer.\n* These exist but `aren't `_\n `documented `_ or\n `maintained `_.\n\nInstallation\n------------\n\n1. Get the project source and install it::\n\n $ pip install dbag\n\n2. Add `dbag` to your tuple of ``INSTALLED_APPS``.\n3. Add the dbag urls to your ``urls.py``. Eg::\n\n urlpatterns = patterns('',\n url('^dbag/', include('dbag.urls'),\n )\n\n If you're not using `Nexus `_ then you\n also need to add this to ``urls.py`` for automatic ``MetricType``\n discovery::\n\n import dbag\n dbag.autodiscover()\n\n3. Create the database schema::\n \n\n $ ./manage.py syncdb\n\n or if you're using `South `_ ::\n \n $ ./manage.py syncdb --migrate\n\n4. Configure some initial metrics::\n\n $ ./manage.py dbag_init\n\n5. If you're already using `Celery `_ then\n ensure that\n `celerybeat `_\n is running. Otherwise, you can run:: \n \n $ ./manage.py dbag_output_cronjob > /etc/cron.d/dbag_collect_metrics \n \n to set up a cron job to collect your metrics every day. You'll need to\n edit the resulting file to use the correct paths and the correct user. \n\n6. If you want to force collection of your first days worth of metrics, you can also run::\n\n $ ./manage.py dbag_collect_metrics\n\n Alternatively, you can generate some random fake data to demo with using::\n\n $ ./manage.py dbag_fake_metrics\n\n7. Now start up your devserver, login and visit \n `http://localhost:8000/dbag/ `_\n (or wherever you told your ``urls.py`` to point for dbag).\n\nAdd a New Metric\n----------------\n\nYou can add new metrics to start collecting either through the `Nexus\n`_ frontend or via the API in python. Either\nway you'll be choosing 5 things to define your metric.\n\n**metric_type_label** \n The label for the type of metric we're collecting. These python subclasses\n of ``dbag.metric_types.MetricType`` are registered with dbag (with a unique\n label) and define how a metric is gathered and what options are required to\n gather it. Included examples are an ``ActiveUsersCount`` type that optionally\n takes an ORM filter to define a subset of users and a ``MixpanelEvent`` type\n that takes an event name and optional properties to slice and records the\n value for the day.\n\n**label** \n The human-readable name of this metric.\n\n**slug** \n A unique slug identifying this metric.\n\n**description** \n An optional long-form description of this metric.\n\n**do_collect** \n Whether or not to collect new values for this metric (default to False).\n\n**kwargs** \n Some MetricTypes take required or optional keyword configuration arguments.\n In the following example, ``mp_property`` is an optional keyword argument.\n\n\nAn example API call to create a metric might be::\n\n from dbag import dbag_manager\n dbag_manager.create_metric(\n 'MixpanelEvent', \n label='superuser comments', \n slug='superuser_comments', \n description=\"number of comments made by superusers\", \n unit_label=\"comment\",\n unit_label_plural=\"comments\",\n mp_property=\"is_superuser=true\")\n\n\nCreate a New MetricType\n-----------------------\n\nYou can add a new MetricType whenever you need to gather/summarize data from a\nnew source. An example would be a MetricType that used github's API to count\nthe number of open tickets on a specific project. Subclass\n``dbag.metric_types.MetricType`` with your object, put it in a\n``dbag_metric_types`` module in one of your ``INSTALLED_APPS`` and then call::\n\n from dbag import dbag_manager\n dbag_manager.register_metric_type(, )\n\nFor now, check the builtin types located at ``dbag.metric_types`` for details.\n\nDbag? Really?\n-------------\n\nA defensible rationalization is that the name is short for \"data bag.\"\n\nIs it Awesome?\n--------------\n\nYes. Increasingly so.\n\nTODO- maybe?\n------------\n\n* Add support for Flask and Pyramid (or others?)\n* Provide a REST API for accessing metrics data",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://github.com/winhamwr/dbag",
"keywords": null,
"license": "BSD",
"maintainer": null,
"maintainer_email": null,
"name": "dbag",
"package_url": "https://pypi.org/project/dbag/",
"platform": "any",
"project_url": "https://pypi.org/project/dbag/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "http://github.com/winhamwr/dbag"
},
"release_url": "https://pypi.org/project/dbag/0.1.2/",
"requires_dist": null,
"requires_python": null,
"summary": "Dbag- Easy time-series metrics and dashboarding",
"version": "0.1.2"
},
"last_serial": 788840,
"releases": {
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "d9e0fcc8b2bb0e2bcf4932da0c754323",
"sha256": "cd974dc2dcfa23f4814f70a5ac8c472ab43912c25d35e7c9f96c4cf5f8302b54"
},
"downloads": -1,
"filename": "dbag-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "d9e0fcc8b2bb0e2bcf4932da0c754323",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17509,
"upload_time": "2011-11-18T22:41:22",
"url": "https://files.pythonhosted.org/packages/a3/61/0db979c87ce419580bb7feece271ba4b8d99488873bd5fd1531deb07bb0a/dbag-0.1.1.tar.gz"
}
],
"0.1.2": [
{
"comment_text": "",
"digests": {
"md5": "1993b7b706f0b23565b8c9840fea1186",
"sha256": "71b211d4b2bda92edf88d5db4ae77090bdd20f82302c941d56c73e81ee0b3094"
},
"downloads": -1,
"filename": "dbag-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "1993b7b706f0b23565b8c9840fea1186",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 72322,
"upload_time": "2011-11-21T23:00:11",
"url": "https://files.pythonhosted.org/packages/ee/4c/17bc34ad79e20f54929bd24178843f50fa7721ac8cbd916c134ce1bf3d64/dbag-0.1.2.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "1993b7b706f0b23565b8c9840fea1186",
"sha256": "71b211d4b2bda92edf88d5db4ae77090bdd20f82302c941d56c73e81ee0b3094"
},
"downloads": -1,
"filename": "dbag-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "1993b7b706f0b23565b8c9840fea1186",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 72322,
"upload_time": "2011-11-21T23:00:11",
"url": "https://files.pythonhosted.org/packages/ee/4c/17bc34ad79e20f54929bd24178843f50fa7721ac8cbd916c134ce1bf3d64/dbag-0.1.2.tar.gz"
}
]
}