{ "info": { "author": "xiaoch05", "author_email": "xiaoch2010@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# DBot-server metrics\nThe metrics client for dbot-server.\n\nIt supports collecting and transporting metrics for each dbot-server. \n* Currently we have some inner output-plugins, and more, you can define your own ouput-plugins. \n* Output-plugins can work at the same time, but we recommand only one.\n* Also the input metric-plugin can be defined by yourself. \n* Only you need to do is implementing the Plugin-Interface and configuring the file `collector.conf`.\n\n## Installation \n`pip install dbot_metrics`\n\nIf you used default collector.conf file from system, you should copy it to /etc\n\n## Dependencies\nInstall leveldb if you want to use the recommand output-plugin leveldb-client\n```\npip install leveldb\n```\n\nInstall influxdb-python first if you want to use the inner output-plugin influxdb-client.\n```\n$ sudo apt-get install python-influxdb\n```\n\nGet more information, see https://github.com/influxdata/influxdb-python.\n\nInstall tinydb if you want to use the inner output-plugin tinydb-client.\n```\npip install tinydb\n```\n\nInstall unqlite if you want to use output-plugin unqlite-client\n```\npip install unqlite\n```\n\n## Documentation \nSee https://github.com/ATNIO/AI_market_plan/wiki/metric-heartbeat.\n\n## Interface\nMetrics support query interface, it receive a json-type request parameter like this:\n```\n{ 'range': { 'from': 1532023625, 'to': 1532025313 },\n 'targets': [{'table':'student', 'type':'all', 'sentence':''},\n {'table':'teacher', 'type':'sql', 'sentence': 'select * from teacher'},\n {'table':'others', 'type':'columns', 'sentence': 'age|name|no'}]}\n```\nand the response format is like this:\n```\n[ {\n 'name': 'influxdb',\n 'content':[ {\n 'time':1532023688,\n 'tags':{'name':'John', 'No':10023},\n 'fields': {'age': 23, 'gender': 'male'} \n },\n {\n 'time':1532023798,\n 'tags':{'name':'Tom', 'No':10024},\n 'fields': {'age': 25, 'gender': 'male'}\n }\n ]\n }\n]\n```\n\n## Examples\n```\nfrom dbot_metrics import DBotMetricsCollector\n# DBotApiMetric is a special metric in dbot_service_metric defined by yourself\nfrom dbot_service_metric import DBotApiMetric\n\nDBotMetricsCollector().Start(\"./collector.conf\")\nm = DBotApiMetric()\nDBotMetricsCollector().RegisterMetrics(m)\nm.EnableDetailRecord(False)\n\napiinfo = m.CallBegin(\"/api/dbot_server/api_call_test\", \"user\")\n# ... ... processing\nm.CallEnd(apiinfo, 0)\n\nDBotMetricsCollector().Stop()\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ATNIO/metrics", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "dbot-metrics", "package_url": "https://pypi.org/project/dbot-metrics/", "platform": "", "project_url": "https://pypi.org/project/dbot-metrics/", "project_urls": { "Homepage": "https://github.com/ATNIO/metrics" }, "release_url": "https://pypi.org/project/dbot-metrics/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "ATN atn dbot metrics package", "version": "0.1.5" }, "last_serial": 4281821, "releases": { "0.0.4": [ { "comment_text": "", "digests": { "md5": "d7d510c017134bad9ccad00eba71ac4d", "sha256": "ce4af534be7a2a30cb34be4a15d4c9290c47b50d19b1b19ba0648f02988e0f38" }, "downloads": -1, "filename": "dbot_metrics-0.0.4.tar.gz", "has_sig": false, "md5_digest": "d7d510c017134bad9ccad00eba71ac4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6412, "upload_time": "2018-07-26T09:48:38", "url": "https://files.pythonhosted.org/packages/69/03/9d91a359d6741355ea0c9ac3a0d2b584ffa480aba9a97ab018653669b486/dbot_metrics-0.0.4.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "2cdff3418dbd7b71f0beb337506d1e77", "sha256": "ded37e52ca3de844e91b816b544cc1dd64a92b496e7b45db18820f0b58633193" }, "downloads": -1, "filename": "dbot_metrics-0.0.6.tar.gz", "has_sig": false, "md5_digest": "2cdff3418dbd7b71f0beb337506d1e77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6122, "upload_time": "2018-08-14T05:45:35", "url": "https://files.pythonhosted.org/packages/bc/08/00c9d32f0c0b58ef366f86bc23dabbfad58e6dcf12fa283a95afed25f3f2/dbot_metrics-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "eb734031eb5bb077c120580c2ed0d97f", "sha256": "89841464eb13bca594790b00e6753a1b1789d1f7030d525c0f8d34fd71550c10" }, "downloads": -1, "filename": "dbot_metrics-0.0.7.tar.gz", "has_sig": false, "md5_digest": "eb734031eb5bb077c120580c2ed0d97f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6504, "upload_time": "2018-08-14T07:39:34", "url": "https://files.pythonhosted.org/packages/e5/24/fc5120fc0f1fefcaa581ecd695b9574dd1457a0db5931687c9e4bb790649/dbot_metrics-0.0.7.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "023b6c8855181ab2e644e145dff9b42d", "sha256": "b4350c60fd9cc81a9087bdc6a72fe0ad9166a33cf6f5bd624973f3534b52b029" }, "downloads": -1, "filename": "dbot_metrics-0.1.5.tar.gz", "has_sig": false, "md5_digest": "023b6c8855181ab2e644e145dff9b42d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6387, "upload_time": "2018-09-18T03:18:35", "url": "https://files.pythonhosted.org/packages/d2/ba/73e0247266189706307da24df5f75ca99eedc983ca704cefd25b2d4ef6f1/dbot_metrics-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "023b6c8855181ab2e644e145dff9b42d", "sha256": "b4350c60fd9cc81a9087bdc6a72fe0ad9166a33cf6f5bd624973f3534b52b029" }, "downloads": -1, "filename": "dbot_metrics-0.1.5.tar.gz", "has_sig": false, "md5_digest": "023b6c8855181ab2e644e145dff9b42d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6387, "upload_time": "2018-09-18T03:18:35", "url": "https://files.pythonhosted.org/packages/d2/ba/73e0247266189706307da24df5f75ca99eedc983ca704cefd25b2d4ef6f1/dbot_metrics-0.1.5.tar.gz" } ] }