{ "info": { "author": "peablog", "author_email": "peablog@qq.com", "bugtrack_url": null, "classifiers": [], "description": "# \u901a\u7528\u5e94\u7528\u76d1\u63a7\u6846\u67b6\n\n@author Danny0\n\n\u76d1\u63a7\u5e94\u7528\u5e76\u5c06\u6570\u636e\u4fdd\u5b58\u5230influxdb\u4e2d, \u76ee\u524d\u5df2\u7ecf\u5b9e\u73b0Redis/Mysql/Nginx\u76d1\u63a7\u3002\n[influxdb \u5b98\u65b9\u5b89\u88c5\u6587\u6863](http://docs.influxdata.com/influxdb/v1.2/introduction/installation/)\n\n# \u5b89\u88c5\n\n## \u6e90\u7801\u5b89\u88c5\n\n```\ngit clone https://github.com/peablog/monflux\npython setup.py install\n```\n\n## pip\u5b89\u88c5\n\n```\npip install monflux\n```\n\n# \u4f7f\u7528\n\n## \u57fa\u7840\u914d\u7f6e\n\n\u9996\u5148\u5728\u4ee3\u7801\u4e2d\u6dfb\u52a0influxdb\u7684\u8fde\u63a5\u914d\u7f6e:\n```\ninflux_config = {\n \"host\": \"127.0.0.1\",\n \"port\": 8086,\n \"username\": \"\",\n \"password\": \"\",\n \"database\": \"\"\n}\n```\n\n## Redis\u76d1\u63a7\n\u8bbe\u7f6eredis\u8fde\u63a5\u7684\u914d\u7f6e\u4fe1\u606f\uff1a\n```\nredis_config = {\n \"host\": \"127.0.0.1\",\n \"password\": \"\",\n \"port\": \n}\n```\n\u5f15\u5165\u76d1\u63a7\u7c7b\u5e76\u5b9e\u4f8b\u5316: \n```\nfrom monflux import RedisMonitor\nRedisMonitor(influx_config, redis_config, \"redis_load\").start()\n```\n\u7b2c\u4e09\u4e2a\u53c2\u6570\u662finfluxdb\u4fdd\u5b58\u7684measurement\n\n\u6ce8\uff1a\u9700\u8981\u5b89\u88c5python redis\u5ba2\u6237\u7aef\u5e93\uff0c\u53ef\u901a\u8fc7`pip install redis`\u5b89\u88c5\n\n## Mysql\u76d1\u63a7\n\n\u8bbe\u7f6eMysql\u8fde\u63a5\u7684\u914d\u7f6e\u4fe1\u606f\uff1a\n```\nmysql_config = {\n \"host\": \"127.0.0.1\",\n \"username\": \"\",\n \"password\": \"\",\n \"port\": 3306\n}\n```\n\n\u5f15\u5165\u76d1\u63a7\u7c7b\u5e76\u5b9e\u4f8b\u5316: \n```\nfrom monflux import MysqlMonitor\nMysqlMonitor(influx_config, mysql_config, \"mysql_load\").start()\n```\n\u6ce8\uff1a\u9700\u8981\u5b89\u88c5python mysql\u5ba2\u6237\u7aef\u5e93\uff0c\u53ef\u901a\u8fc7`pip install mysql-python`\u5b89\u88c5\n\n## Nginx\u76d1\u63a7\n\n\u8bbe\u7f6eNginx\u7684\u914d\u7f6e\u4fe1\u606f\uff1a\n```\nnginx_config = {\n \"url\": \"http://10.110.95.67/nginx_status\",\n}\n```\n\n\u5f15\u5165\u76d1\u63a7\u7c7b\u5e76\u5b9e\u4f8b\u5316: \n```\nfrom monflux import NginxMonitor\nNginxMonitor(influx_config, nginx_config, \"nginx_load\").start()\n```\n\n## \u5176\u4ed6\n\u60a8\u53ef\u4ee5\u53c2\u8003Redis\u6216\u8005Nginx\u7684\u76d1\u63a7\u5b9e\u73b0\u6765\u5199\u60a8\u81ea\u5df1\u7684\u63d2\u4ef6\u3002 \n\u5177\u4f53\u6559\u7a0b\u5f85\u8865\u5145\u3002\n\n# \u6570\u636e\u5c55\u73b0\n\n\u53ef\u901a\u8fc7Grafana\u6765\u5c55\u793a\u4fdd\u5b58\u5230influxdb\u4e2d\u7684\u76d1\u63a7\u6570\u636e\u3002\nmysql\u914d\u7f6e\u793a\u4f8b\uff1a\n![](http://img.peablog.com/2017-06-13-14973476197412.jpg)\n\nmysql\u76d1\u63a7\u5c55\u793a\u6548\u679c\uff1a\n![](http://img.peablog.com/2017-06-13-14973477306458.jpg)\n\n\u60a8\u8fd8\u53ef\u4ee5\u901a\u8fc7influxdata\u81ea\u5bb6\u7684Chronograf\u6765\u5c55\u793a\uff0c\u6bd5\u7adf\u662finfluxdata\u81ea\u5bb6\u7684\u4e1c\u897f\uff0c\u5bf9influxdb\u7684\u652f\u6301\u5e94\u8be5\u8981\u597d\u4e00\u4e9b\u3002\n\n# \u7c7b\u4f3c\u5de5\u5177\ninfluxdb\u7684\u5f00\u53d1\u5546influxdata\u65d7\u4e0b\u672c\u8eab\u5df2\u6709\u4e00\u6b3e\u76d1\u63a7\u5de5\u5177\uff1aTelegraf. \u5b83\u4e0d\u4ec5\u652f\u6301\u81ea\u5bb6\u7684influxdb, \u4e5f\u652f\u6301Es\u3001Kafka\u7b49\u5176\u4ed6\u6d41\u884c\u5f00\u6e90\u5de5\u5177, \u652f\u6301\u7684\u8f93\u5165\u63d2\u4ef6\u4e5f\u975e\u5e38\u591a\u3002\n\u4f46\u5b83\u7684\u4f7f\u7528\u65b9\u5f0f\u662f\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u6765\u5b9e\u73b0\u7684\uff0c\u90e8\u5206\u914d\u7f6e\u611f\u89c9\u7565\u590d\u6742\u3002\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/peablog/monflux", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "monflux", "package_url": "https://pypi.org/project/monflux/", "platform": "", "project_url": "https://pypi.org/project/monflux/", "project_urls": { "Homepage": "https://github.com/peablog/monflux" }, "release_url": "https://pypi.org/project/monflux/0.0.5/", "requires_dist": null, "requires_python": "", "summary": "collecting and reporting redis/mysql/nginx metrics , save data to influxdb", "version": "0.0.5" }, "last_serial": 2946633, "releases": { "0.0.5": [ { "comment_text": "", "digests": { "md5": "3bc49809dd60d570ebc8980695bfcd11", "sha256": "4b754c5939f1552b95b8eed69b7e64c1723526d93ea1c2e6fb4a8a7e4a47b0d7" }, "downloads": -1, "filename": "monflux-0.0.5.tar.gz", "has_sig": false, "md5_digest": "3bc49809dd60d570ebc8980695bfcd11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4587, "upload_time": "2017-06-13T11:15:44", "url": "https://files.pythonhosted.org/packages/91/d4/9de1e0d1a5c3cf2fe1cc0840db4ac08cb66101bbb6f9dd2f6441a79d861a/monflux-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3bc49809dd60d570ebc8980695bfcd11", "sha256": "4b754c5939f1552b95b8eed69b7e64c1723526d93ea1c2e6fb4a8a7e4a47b0d7" }, "downloads": -1, "filename": "monflux-0.0.5.tar.gz", "has_sig": false, "md5_digest": "3bc49809dd60d570ebc8980695bfcd11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4587, "upload_time": "2017-06-13T11:15:44", "url": "https://files.pythonhosted.org/packages/91/d4/9de1e0d1a5c3cf2fe1cc0840db4ac08cb66101bbb6f9dd2f6441a79d861a/monflux-0.0.5.tar.gz" } ] }