{ "info": { "author": "Wargaming Team", "author_email": "", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# aiohttp_prometheus_monitoring\n\n[![PyPI](https://img.shields.io/pypi/v/aiohttp-prometheus-monitoring.svg?maxAge=3600)](https://pypi.python.org/pypi/aiohttp-prometheus-monitoring)\n[![Python Versions](https://img.shields.io/pypi/pyversions/aiohttp-prometheus-monitoring.svg?maxAge=3600)](https://pypi.python.org/pypi/aiohttp-prometheus-monitoring)\n\nThis package allows to monitor availability of your aiohttp-application components and exports the metrics for prometheus scraper.\n\nIt can monitor:\n\n- external host HTTP status\n- postgres database status\n- mysql database status\n- redis availability\n- rabbit AMQP availability\n- whatever else, as can be extended easily\n\nIt periodically calls services, stores boolean result in Gauge metrics and exports the metrics via the /metrics endpoint.\n\nNo additional workers required, everything is built-in into your app.\n\nThen you can build graphs based on this data:\n \n![Graphs](graphs.png)\n\n## Install:\n\n pip install aiohttp_prometheus_monitoring[amqp,redis,postgres,mysql]\n\n## Sample config:\n\n MONITORING = {\n 'route_ping': '/ping',\n 'route_metrics': '/metrics',\n \n 'metrics': [\n {\n 'name': 'monitoring_http',\n 'description': 'Check HTTP status',\n 'module': 'aiohttp_prometheus_monitoring.metrics.http.HttpMetric',\n 'sleep_time': 300,\n 'params': {\n 'url': 'http://localhost/my_ping/',\n 'timeout': 1,\n 'verify_ssl': True,\n }\n },\n {\n 'name': 'monitoring_redis',\n 'description': 'Check redis connection',\n 'module': 'aiohttp_prometheus_monitoring.metrics.redis.RedisMetric',\n 'sleep_time': 60,\n 'params': {\n 'host': 'localhost',\n 'port': '6379',\n }\n },\n {\n 'name': 'monitoring_mq',\n 'description': 'Check MQ connection',\n 'module': 'aiohttp_prometheus_monitoring.metrics.amqp.AmqpMetric',\n 'sleep_time': 60,\n 'params': {\n 'host': 'localhost',\n 'port': '5672',\n 'user': 'root',\n 'password': '123',\n 'vhost': 'myvhost',\n }\n },\n {\n 'name': 'monitoring_postgres',\n 'description': 'Check postgres connection',\n 'module': 'aiohttp_prometheus_monitoring.metrics.postgres.PostgresMetric',\n 'sleep_time': 60,\n 'params': {\n 'database': 'core',\n 'user': 'core',\n 'password': 'core',\n 'host': 'localhost',\n 'port': 5433,\n }\n },\n {\n 'name': 'monitoring_mysql',\n 'description': 'Check mysql connection',\n 'module': 'aiohttp_prometheus_monitoring.metrics.mysql.MySQLMetric',\n 'sleep_time': 60,\n 'params': {\n 'database': 'core',\n 'user': 'core',\n 'password': 'core',\n 'host': 'localhost',\n 'port': 3007,\n }\n },\n ]\n }\n\n## Usage: \n\n from aiohttp import web\n from aiohttp_prometheus_monitoring import setup_monitoring\n \n \n def create_app(loop=None): \n app = web.Application()\n loop.run_until_complete(setup_monitoring(settings.MONITORING, app))\n \n return app\n\nCheck http://YOURAPP/ping and http://YOURAPP/metrics - /ping endpoint will respond \"pong\", /metrics endpoint will have metrics in prometheus format.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "aiohttp-prometheus-monitoring", "package_url": "https://pypi.org/project/aiohttp-prometheus-monitoring/", "platform": "", "project_url": "https://pypi.org/project/aiohttp-prometheus-monitoring/", "project_urls": null, "release_url": "https://pypi.org/project/aiohttp-prometheus-monitoring/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "", "version": "0.1.5" }, "last_serial": 4579989, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "f144271ee876a328f30b5aa9fd39bf55", "sha256": "c8bb5bbe856b7b4892538dd61df2eabb2e14c9ed57ba89af2d5f902f057dbfa1" }, "downloads": -1, "filename": "aiohttp_prometheus_monitoring-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f144271ee876a328f30b5aa9fd39bf55", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5211, "upload_time": "2017-12-22T13:32:50", "url": "https://files.pythonhosted.org/packages/2f/82/9a69b205a8735ad470a5bcda0ecd363714011ef44f586e6dfacb7407fc55/aiohttp_prometheus_monitoring-0.1.1.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "8ce27106937a15897a6b96243c02e215", "sha256": "8994cd0147db8a0984992fd8e239793739793842020399cb8c63023aef64952f" }, "downloads": -1, "filename": "aiohttp_prometheus_monitoring-0.1.3.tar.gz", "has_sig": false, "md5_digest": "8ce27106937a15897a6b96243c02e215", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5560, "upload_time": "2018-05-23T12:17:36", "url": "https://files.pythonhosted.org/packages/ef/17/ca21e424a148b2f06fc635535c3743e773c9755379c7a33fcb3feb3e6e54/aiohttp_prometheus_monitoring-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "2a061aca757ca631247618a64f0db505", "sha256": "3453b3d71ff50bee71e10a9e9a1b47475fb8acca689611bceea6cf1d51933a5f" }, "downloads": -1, "filename": "aiohttp_prometheus_monitoring-0.1.4.tar.gz", "has_sig": false, "md5_digest": "2a061aca757ca631247618a64f0db505", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5846, "upload_time": "2018-08-14T15:01:01", "url": "https://files.pythonhosted.org/packages/3a/97/87fc2db98b1fa301f5ad90bce282cd1644930d22b4e6bb4b9874004d1757/aiohttp_prometheus_monitoring-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "b0be4b5b72780e737a9800fb7ef8b578", "sha256": "fd9b2d5830fc2ae70ca15d94bae65fd95cbe5ff83462c649076533f592b90405" }, "downloads": -1, "filename": "aiohttp_prometheus_monitoring-0.1.5.tar.gz", "has_sig": false, "md5_digest": "b0be4b5b72780e737a9800fb7ef8b578", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5841, "upload_time": "2018-12-10T09:55:37", "url": "https://files.pythonhosted.org/packages/26/bf/7efac157c4524b74fbaab1f0149446506fdabab04dc3ab580133a6b74db7/aiohttp_prometheus_monitoring-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b0be4b5b72780e737a9800fb7ef8b578", "sha256": "fd9b2d5830fc2ae70ca15d94bae65fd95cbe5ff83462c649076533f592b90405" }, "downloads": -1, "filename": "aiohttp_prometheus_monitoring-0.1.5.tar.gz", "has_sig": false, "md5_digest": "b0be4b5b72780e737a9800fb7ef8b578", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5841, "upload_time": "2018-12-10T09:55:37", "url": "https://files.pythonhosted.org/packages/26/bf/7efac157c4524b74fbaab1f0149446506fdabab04dc3ab580133a6b74db7/aiohttp_prometheus_monitoring-0.1.5.tar.gz" } ] }