{ "info": { "author": "Aylei Wu", "author_email": "rayingecho@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Topic :: System :: Monitoring" ], "description": "# Prometheus Exporter for Alibaba Cloud\n\n![license](https://img.shields.io/hexpm/l/plug.svg)\n[![help wanted](https://img.shields.io/github/issues/aylei/aliyun-exporter/help%20wanted.svg)](https://github.com/aylei/aliyun-exporter/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)\n[![pypi](https://img.shields.io/pypi/v/aliyun-exporter.svg)](https://pypi.org/project/aliyun-exporter/)\n[![docker](https://img.shields.io/docker/pulls/aylei/aliyun-exporter.svg)](https://cloud.docker.com/u/aylei/repository/docker/aylei/aliyun-exporter)\n[![Build Status](https://travis-ci.org/aylei/aliyun-exporter.svg?branch=master)](https://travis-ci.org/aylei/aliyun-exporter)\n\n[\u4e2d\u6587](./README_cn.md)\n\n* [Features](#features)\n* [Screenshots](#screenshots)\n* [Quick Start](#quick-start)\n* [Installation](#installation)\n* [Usage](#usage)\n* [Docker Image](#docker-image)\n* [Configuration](#configuration)\n* [Metrics Meta](#metrics-meta)\n* [Scale and HA Setup](#scale-and-ha-setup)\n* [Contribute](#contribute)\n\nThis Prometheus exporter collects metrics from the [CloudMonitor API](https://partners-intl.aliyun.com/help/doc-detail/51939.htm) of Alibaba Cloud. It can help you:\n\n* integrate CloudMonitor to your Monitoring System.\n* leverage the power of PromQL, Alertmanager and Grafana(see [Screenshots](#)).\n* analyze metrics however you want.\n* save money. Api invocation is far cheaper than other services provided by CloudMonitor.\n\nThis project also provides an out-of-box solution for full-stack monitoring of Alibaba Cloud, including dashboards, alerting and diagnosing.\n\n## Screenshots\n\n![gif](/static/img/stack.gif)\n\n[more screenshots here](./screenshots.md)\n\n## Quick Start\n\nA docker-compose stack is provided to launch the entire monitoring stack with Aliyun-Exporter, Prometheus, Grafana and Alertmanager.\n\nPre-requisites: docker 1.17+\n\n```bash\ngit clone git@github.com:aylei/aliyun-exporter.git\ncd docker-compose\nALIYUN_ACCESS_ID=YOUR_ACCESS_ID ALIYUN_ACCESS_SECRET=YOUR_ACCESS_KEY docker-compose up\n```\n\nInvestigate dashboards in [localhost:3000](http://localhost:3000) (the default credential for Grafana is admin:admin).\n\nFor more details, see [Docker Compose](#docker-compose).\n\n## Installation\n\nPython 3.5+ is required.\n\n```bash\npip3 install aliyun-exporter\n```\n\n## Usage\n\nConfig your credential and interested metrics:\n\n```yaml\ncredential:\n access_key_id: \n access_key_secret: \n region_id: \n\nmetrics:\n acs_cdn:\n - name: QPS\n acs_mongodb:\n - name: CPUUtilization\n period: 300\n```\n\nRun the exporter:\n\n```bash\n> aliyun-exporter -p 9525 -c aliyun-exporter.yml\n```\n\nThe default port is 9525, default config file location is `./aliyun-exporter.yml`.\n\nVisit metrics in [localhost:9525/metrics](http://localhost:9525/metrics)\n\n## Docker Image\n\nInstall\n```bash\ndocker pull aylei/aliyun-exporter:0.3.0\n```\n\nTo run the container, external configuration file is required:\n```bash\ndocker run -p 9525:9525 -v $(pwd)/aliyun-exporter.yml:$(pwd)/aliyun-exporter.yml aylei/aliyun-exporter:0.3.0 -c $(pwd)/aliyun-exporter.yml\n```\n\n## Configuration\n\n```yaml\nrate_limit: 5 # request rate limit per second. default: 10\ncredential:\n access_key_id: # required\n access_key_secret: # required\n region_id: # default: 'cn-hangzhou'\n\nmetrics: # required, metrics specifications\n acs_cdn: # required, Project Name of CloudMonitor\n - name: QPS # required, Metric Name of CloudMonitor, belongs to a certain Project\n rename: qps # rename the related prometheus metric. default: same as the 'name'\n period: 60 # query period. default: 60\n measure: Average # measure field in the response. default: Average\n\ninfo_metrics:\n - ecs\n - rds\n - redis\n```\n\nNotes:\n\n* Find your target metrics using [Metrics Meta](#metrics-meta)\n* CloudMonitor API has an rate limit, tuning the `rate_limit` configuration if the requests are rejected.\n* CloudMonitor API also has an monthly quota for invocations (AFAIK, 5,000,000 invocations / month for free). Plan your usage in advance. \n\n> Given that you have 50 metrics to scrape with 60s scrape interval, about 2,160,000 requests will be sent by the exporter for 30 days.\n\n## Special Project\n\nSome metrics are not included in the Cloud Monitor API. For these metrics, we keep the configuration abstraction consistent by defining special projects.\n\nSpecial Projects:\n\n* `rds_performance`: RDS performance metrics, available metric names: [Performance parameter table](https://www.alibabacloud.com/help/doc-detail/26316.htm?spm=a2c63.p38356.b99.361.694917e6Rtuu9i)\n\n> An example configuration file of special project is provided as `special-projects.yml`\n\n**Note**: special projects invokes different API with ordinary metrics, so it will not consume your Cloud Monitor API invocation quota. But the API of special projects could be slow, so it is recommended to separate special projects into a standalone exporter instance.\n\n## Metrics Meta\n\n`aliyun-exporter` shipped with a simple site hosting the metrics meta from the CloudMonitor API. You can visit the metric meta in [localhost:9525](http://localhost:9525) after launching the exporter.\n\n* `host:port` will host all the available monitor projects\n* `host:port/projects/{project}` will host the metrics meta of a certain project\n* `host:port/yaml/{project}` will host a config YAML of the project's metrics\n\nyou can easily navigate in this pages by hyperlink.\n\n## Docker Compose\n\nFrom `0.3.0`, we provide a docker-compose stack to help users building monitoring stack from scratch. The stack contains:\n\n* aliyun-exporter (this project): Retrieving metrics (and instance information) from Alibaba Cloud.\n* [Prometheus](https://github.com/prometheus/prometheus): Metric storage and alerting calculation.\n* [Alertmanager](https://github.com/prometheus/alertmanager): Alert routing and notifying.\n* [Grafana](https://github.com/grafana/grafana): Dashboards.\n* [prometheus-webhook-dingtalk](https://github.com/timonwong/prometheus-webhook-dingtalk): DingTalk (a.k.a. DingDing) notification integrating.\n\nHere's a detailed launch guide:\n\n```bash\n# config prometheus external host\nexport PROMETHEUS_HOST=YOUR_PUBLIC_IP_OR_HOSTNAME\n# config dingtalk robot token\nexport DINGTALK_TOKEN=YOUR_DINGTALK_ROBOT_TOEKN\n# config aliyun-exporter credential\nexport ALIYUN_REGION=YOUR_REGION\nexport ALIYUN_ACCESS_ID=YOUR_ID\nexport ALIYUN_ACCESS_SECRET=YOUR_SECRET\ndocker-compose up -d\n```\n\nAfter launching, you can access: \n\n* grafana: http://localhost:3000\n* prometheus: http://localhost:9090\n* alertmanager: http://localhost:9093\n\nYou may customize the configuration of this components by editing the configuration files in `./docker-compose/{component}`\n\n## Telemetry\n\nRequest success summary and failure summary are exposed in `cloudmonitor_request_latency_seconds` and `cloudmonitor_failed_request_latency_seconds`.\n\nEach `Project-Metric` pair will have a corresponding metric named `aliyun_{project}_{metric}_up`, which indicates whether this metric are successfully scraped.\n\n## Scale and HA Setup\n\nThe CloudMonitor API could be slow if you have large amount of resources. You can separate metrics over multiple exporter instances to scale.\n\nFor HA setup, simply duplicate your deployments: 2 * prometheus, and 2 * exporter for each prometheus.\n\n> HA Setup will double your requests, which may run out your quota.\n\n## Contribute\n\nFeel free to open issues and pull requests, any feedback will be highly appreciated!\n\nPlease check the [`help wanted`](https://github.com/aylei/aliyun-exporter/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) label to find issues that are good for getting started.\n\nBesides, contributing to new [alert rules](./docker-compose/prometheus/rules.yml), new [dashboards](./docker-compose/grafana/dashboards) is also welcomed!\n\n\n\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/aylei/aliyun-exporter", "keywords": "monitoring prometheus exporter aliyun alibaba cloudmonitor", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "aliyun-exporter", "package_url": "https://pypi.org/project/aliyun-exporter/", "platform": "", "project_url": "https://pypi.org/project/aliyun-exporter/", "project_urls": { "Homepage": "https://github.com/aylei/aliyun-exporter" }, "release_url": "https://pypi.org/project/aliyun-exporter/0.3.1/", "requires_dist": [ "prometheus-client", "aliyun-python-sdk-cms (==6.0.13)", "aliyun-python-sdk-core-v3 (==2.13.3)", "pyyaml", "ratelimiter", "flask", "cachetools", "aliyun-python-sdk-ecs (==4.16.5)", "aliyun-python-sdk-rds (==2.3.2)", "aliyun-python-sdk-r-kvstore (==2.0.5)" ], "requires_python": "", "summary": "Alibaba Cloud CloudMonitor Prometheus exporter", "version": "0.3.1" }, "last_serial": 5127196, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "08cefe2db707ae7e965db6be77663c58", "sha256": "4e859d46f16bc0cda2672df2a65c0423ef00e4a3fc78de9ee52cb717dfc3ab9c" }, "downloads": -1, "filename": "aliyun_exporter-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "08cefe2db707ae7e965db6be77663c58", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11085, "upload_time": "2018-12-09T13:06:36", "url": "https://files.pythonhosted.org/packages/df/fc/5fda678604e3d5a2340ce69222ff2aacb342c3912d98be41a2d502e1e8a6/aliyun_exporter-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4ffe9e988351834a1c99717c454bf923", "sha256": "82f2e2e9a4f4c6f8e010f1b636c4f67a47fb537fc9c6a2e383b9bc32c175c2c1" }, "downloads": -1, "filename": "aliyun-exporter-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4ffe9e988351834a1c99717c454bf923", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6662, "upload_time": "2018-12-09T13:06:38", "url": "https://files.pythonhosted.org/packages/f2/a7/e5135e897f9a780714e7a1f6561a0a64a0c726587bde851127910dfbce89/aliyun-exporter-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "15069ae9a6c363525b75b67a165959d1", "sha256": "9358426f3f2175b39cda9f16973d09c81c65616361c7dd2cd70cf620be44540e" }, "downloads": -1, "filename": "aliyun_exporter-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "15069ae9a6c363525b75b67a165959d1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11150, "upload_time": "2018-12-14T15:13:27", "url": "https://files.pythonhosted.org/packages/b9/53/da005d7dbb89f259b0b96f3abb189ec12f24240285a1b5994f1742fa4133/aliyun_exporter-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2ebb84cb0e0a987d942b261168b8b21d", "sha256": "05e42ca581d9d138841f4161aa75c43729daefb73808d1721006b0924f790bb8" }, "downloads": -1, "filename": "aliyun-exporter-0.2.1.tar.gz", "has_sig": false, "md5_digest": "2ebb84cb0e0a987d942b261168b8b21d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6733, "upload_time": "2018-12-14T15:13:29", "url": "https://files.pythonhosted.org/packages/90/23/d8dfbf36e46817fa48f1195d02142b7f61f8f514e235fecbfbbabe3fd44d/aliyun-exporter-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "94c57603d98711f3044d5eeda6335206", "sha256": "acf7d40d0ad36926a827bb072d80bca0a7d49d5f1480a34d56eee78645015297" }, "downloads": -1, "filename": "aliyun_exporter-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "94c57603d98711f3044d5eeda6335206", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15827, "upload_time": "2019-01-05T03:40:45", "url": "https://files.pythonhosted.org/packages/dd/5a/86be100efebb60ab4421dc19ac93f99444d294e94b89db7eb6fd4411b3b2/aliyun_exporter-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d2789987829c1a5672d15949f84f5faf", "sha256": "fdef4d35f2b5100fed7507ad3360c87000e0146feba8a7e9882c7dab80d4d133" }, "downloads": -1, "filename": "aliyun-exporter-0.2.2.tar.gz", "has_sig": false, "md5_digest": "d2789987829c1a5672d15949f84f5faf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12364, "upload_time": "2019-01-05T03:40:47", "url": "https://files.pythonhosted.org/packages/1a/58/92d3c79190686ce8703c89d62d52f81948394e0049c5cd99ff5e4eeebbd6/aliyun-exporter-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "71d2110f58c4281bed24e6d83c0ea2ae", "sha256": "0d98811eedba6ae0a15aabe9b7f376a4987c1ad72ab8d28701f9b6fbd8aeaf51" }, "downloads": -1, "filename": "aliyun_exporter-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "71d2110f58c4281bed24e6d83c0ea2ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17988, "upload_time": "2019-01-24T13:19:52", "url": "https://files.pythonhosted.org/packages/04/a0/194be4d74a1e803987e895a381ac47b92d3a77816927e72354629267aa7d/aliyun_exporter-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5abacc8f957a52bfdfb386c7b78ab3ab", "sha256": "81a6ca683f0dd1441e21d281550056841cd6f22bbf2a44487ebd0a5d71253dc4" }, "downloads": -1, "filename": "aliyun-exporter-0.3.0.tar.gz", "has_sig": false, "md5_digest": "5abacc8f957a52bfdfb386c7b78ab3ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13961, "upload_time": "2019-01-24T13:19:54", "url": "https://files.pythonhosted.org/packages/0d/6d/c41dce64f7b3d288d8f835edb9cad2f20bd8bafc9f8587d8804dfec645d4/aliyun-exporter-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "55ffef451a43e6e9e53df2de8b5502b0", "sha256": "f8a551fe610a3be63d3570539736b372ed8536e431aff904fc6696a88a47064e" }, "downloads": -1, "filename": "aliyun_exporter-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "55ffef451a43e6e9e53df2de8b5502b0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18056, "upload_time": "2019-04-11T05:00:36", "url": "https://files.pythonhosted.org/packages/44/f5/6d85e7397f3645f4ee4bd20a63c8bb07bf6a1e3d060ac09766ac0a107169/aliyun_exporter-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cbbbbe06f606685a9458014caff1a042", "sha256": "922987c2fcf9264fa1cae402c51c446b9b99bccb6acb08ddd688f2ed6d6a7d72" }, "downloads": -1, "filename": "aliyun-exporter-0.3.1.tar.gz", "has_sig": false, "md5_digest": "cbbbbe06f606685a9458014caff1a042", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13969, "upload_time": "2019-04-11T05:00:38", "url": "https://files.pythonhosted.org/packages/53/70/9a9e4fbd00315d07d8d5de4d28de661a971f45f328d5b0559d9341afb436/aliyun-exporter-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "55ffef451a43e6e9e53df2de8b5502b0", "sha256": "f8a551fe610a3be63d3570539736b372ed8536e431aff904fc6696a88a47064e" }, "downloads": -1, "filename": "aliyun_exporter-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "55ffef451a43e6e9e53df2de8b5502b0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18056, "upload_time": "2019-04-11T05:00:36", "url": "https://files.pythonhosted.org/packages/44/f5/6d85e7397f3645f4ee4bd20a63c8bb07bf6a1e3d060ac09766ac0a107169/aliyun_exporter-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cbbbbe06f606685a9458014caff1a042", "sha256": "922987c2fcf9264fa1cae402c51c446b9b99bccb6acb08ddd688f2ed6d6a7d72" }, "downloads": -1, "filename": "aliyun-exporter-0.3.1.tar.gz", "has_sig": false, "md5_digest": "cbbbbe06f606685a9458014caff1a042", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13969, "upload_time": "2019-04-11T05:00:38", "url": "https://files.pythonhosted.org/packages/53/70/9a9e4fbd00315d07d8d5de4d28de661a971f45f328d5b0559d9341afb436/aliyun-exporter-0.3.1.tar.gz" } ] }