{ "info": { "author": "Braedon Vickers", "author_email": "braedon.vickers@gmal.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: System :: Monitoring" ], "description": "Prometheus MySQL Exporter\n====\nThis Prometheus exporter periodically runs configured queries against a MySQL database and exports the results as Prometheus gauge metrics.\n\n# Installation\nYou will need Python 3, pip 3, and libmysqlclient-dev installed to run the exporter.\n\nRun the following in the root project directory to install (i.e. download dependencies, create start script):\n```\n> pip3 install .\n```\nNote that you may need to add the start script location (see pip output) to your `PATH`.\n\n# Usage\nOnce installed, you can run the exporter with the `prometheus-mysql-exporter` command.\n\nBy default, it will bind to port 8080, query MySQL on `localhost:3306` using the `root` user (with no password) and run queries configured in a file `exporter.cfg` in the working directory. There is no default database to run the queries on, so you must specify at least one. You can set the database(s) and change any defaults as required by passing in options:\n```\n> prometheus-mysql-exporter -p -s -u -P -c -d \n```\nRun with the `-h` flag to see details on all the available options.\n\nSee the provided `exporter.cfg` file for query configuration examples and explanation.\n\n# Docker\nYou can build a docker image using the provided Dockerfile. Run the following in the root project directory:\n```\n> sudo docker build -t prometheus-mysql-exporter .\n```\nTo run a container successfully, you will need to mount a query config file to `/usr/src/app/exporter.cfg` and map container port 8080 to a port on the host. Any options placed after the image name (`prometheus-mysql-exporter`) will be passed to the process inside the container. You will also need to use this to configure the MySQL server using `-s`.\n```\n> sudo docker run --rm --name exporter \\\n -v :/usr/src/app/exporter.cfg \\\n -p 8080:8080 \\\n prometheus-mysql-exporter -s -d \n```\nYou can change other options in the same way as `-s`. For example, you could change where the query config file is read from using `-c`.\n\nIf you don't want to mount the query config file in at run time, you could modify the Dockerfile to copy it in when building the image.\n\n# Development\nThe exporter can be installed in \"editable\" mode, using pip's `-e` flag. This allows you to test out changes without having to re-install.\n```\n> pip3 install -e .\n```\n\nSend me a PR if you have a change you want to contribute!\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Braedon/prometheus-mysql-exporter", "keywords": "monitoring prometheus exporter mysql", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "prometheus-mysql-exporter", "package_url": "https://pypi.org/project/prometheus-mysql-exporter/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/prometheus-mysql-exporter/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Braedon/prometheus-mysql-exporter" }, "release_url": "https://pypi.org/project/prometheus-mysql-exporter/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "MySQL query Prometheus exporter", "version": "0.1.1" }, "last_serial": 2352804, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "557a0c0462fca1e7336e770f17333753", "sha256": "c10aa07e49e6946416e46f1df3a11f3853af604cc1f080948e683537426382c6" }, "downloads": -1, "filename": "prometheus-mysql-exporter-0.1.0.tar.gz", "has_sig": false, "md5_digest": "557a0c0462fca1e7336e770f17333753", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5063, "upload_time": "2016-05-17T10:18:18", "url": "https://files.pythonhosted.org/packages/89/72/668d5a27faa0a87b1b843b73c3a73b3da9be2342d5efe94abe1930bb1a45/prometheus-mysql-exporter-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b9a0029b1f73cae1071ccdcfd8d48000", "sha256": "346427c3042e5b3f5411ba38a0b2ecbbc61df74b6e854a4176e37ff0d79fbb58" }, "downloads": -1, "filename": "prometheus-mysql-exporter-0.1.1.zip", "has_sig": false, "md5_digest": "b9a0029b1f73cae1071ccdcfd8d48000", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9991, "upload_time": "2016-09-20T12:23:19", "url": "https://files.pythonhosted.org/packages/04/76/0fb13d472120a759dedc46c6abe13843652192df3c050a608bf00eef4ac8/prometheus-mysql-exporter-0.1.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b9a0029b1f73cae1071ccdcfd8d48000", "sha256": "346427c3042e5b3f5411ba38a0b2ecbbc61df74b6e854a4176e37ff0d79fbb58" }, "downloads": -1, "filename": "prometheus-mysql-exporter-0.1.1.zip", "has_sig": false, "md5_digest": "b9a0029b1f73cae1071ccdcfd8d48000", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9991, "upload_time": "2016-09-20T12:23:19", "url": "https://files.pythonhosted.org/packages/04/76/0fb13d472120a759dedc46c6abe13843652192df3c050a608bf00eef4ac8/prometheus-mysql-exporter-0.1.1.zip" } ] }