{
"info": {
"author": "Jasper Capel, Thijs de Zoete",
"author_email": "jasper.capel@spilgames.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3"
],
"description": "===============================\n\nDeprication\n===========\nThis project is no longer supported by Spil Games and has been adopted by `DB-Art `_.\n\nThe new repository can be found here:\n`MySQL-StatsD @ DB-Art `_\n\n\nmysql-statsd\n===============================\n\nDaemon that gathers statistics from MySQL and sends them to statsd.\n\n- Free software: BSD license\n- Documentation: http://mysql-statsd.rtfd.org.\n\n\nUsage / Installation\n====================\n\nInstall mysql\\_statsd through pip(pip is a python package manager,\nplease don't use sudo!):\n\n::\n\n pip install mysql_statsd\n\nIf all went well, you'll now have a new executable called mysql\\_statsd\nin your path.\n\nRunning mysql\\_statsd\n---------------------\n\n::\n\n $ mysql_statsd --config /etc/mysql-statsd.conf \n\nAssuming you placed a config file in /etc/ named mysql-statsd.conf\n\nSee our example\n`configuration `__\nor read below about how to configure\n\nRunning the above command will start mysql\\_statsd in deamon mode. If\nyou wish to see it's output, then run the command with -f / --foreground\n\n\nUsage\n-----\n\n::\n\n $ mysql_statsd --help\n usage: mysql_statsd.py [-h] [-c FILE] [-d] [-f]\n\n optional arguments:\n -h, --help show this help message and exit\n -c FILE, --config FILE\n Configuration file\n -d, --debug Prints statsd metrics next to sending them\n --dry-run Print the output that would be sent to statsd without\n actually sending data somewhere\n -f, --foreground Dont fork main program\n\nAt the moment there is also a `deamon\nscript `_\nfor this package\n\nYou're more than welcome to help us improve it!\n\n\nPlatforms\n---------\n\nWe would love to support many other kinds of database servers, but\ncurrently we're supporting these:\n\n- MySQL 5.1\n- MySQL 5.5\n- Galera\n\nBoth MySQL versions supported with Percona flavour as well as vanilla.\n\nTodo:\n~~~~~\n\nSupport for the following platforms\n\n- Mysql 5.6\n- MariaDB\n\nWe're looking forward to your pull request for other platforms\n\nDevelopment installation\n------------------------\n\nTo install package, setup a `python virtual\nenvironment `_\n\nInstall the requirements(once the virtual environment is active):\n\n::\n\n pip install -r requirements.txt\n\n*NOTE: MySQL-Python package needs mysql\\_config command to be in your\npath.*\n\nThere are future plans to replace the mysql-python package with\n`PyMySQL `_\n\nAfter that you're able to run the script through\n\n::\n\n $ python mysql_statsd/mysql_statsd.py\n\nCoding standards\n----------------\n\nWe like to stick with the python standard way of working:\n`PEP-8 `_\n\n\n\nConfiguration\n=============\n\nThe configuration consists out of four sections:\n\n- daemon specific (log/pidfiles)\n- statsd (host, port, prefixes)\n- mysql (connecitons, queries, etc)\n- metrics (metrics to be stored including their type)\n\nDaemon\n------\nThe daemon section allows you to set the paths to your log and pic files\n\nStatsd\n------\nThe Statsd section allows you to configure the prefix and hostname of the \nmetrics. In our example the prefix has been set to mysql and the hostname \nis included. This will log the status.com_select metric to:\nmysql..status.com_select\n\nYou can use any prefix that is necessary in your environment.\n\nMySQL\n-----\nThe MySQL section allows you to configure the credentials of your mysql host\n(preferrably on localhost) and the queries + timings for the metrics.\nThe queries and timings are configured through the stats_types configurable,\nso take for instance following example:\n::\n stats_types = status, innodb\nThis will execute both the query_status and query_innodb on the MySQL server.\nThe frequency can then be controlled through the time (in milliseconds) set in\nthe interval_status and interval_innodb.\nThe complete configuration would be:\n::\n stats_types = status, innodb\n query_status = SHOW GLOBAL STATUS\n interval_status = 1000\n query_innodb = SHOW ENGINE INNODB STATUS\n interval_innodb = 10000\n\nA special case is the query_commit: as the connection opened by mysql_statsd \nwill be kept open and auto commit is turned off by default the status \nvariables are not updated if your server is set to REPEATABLE_READ transaction \nisolation. Also most probably your history_list will skyrocket and your \nibdata files will grow fast enough to drain all available diskspace. So when\nin doubt about your transaction isolation: do include the query_commit!\n\nNow here is the interesting part of mysql_statsd: if you wish to keep track \nof your own application data inside your application database you *could* \ncreate your own custom query this way. So for example:\n::\n stats_types = myapp\n query_myapp = SELECT some_metric_name, some_metric_value FROM myapp.metric_table WHERE metric_ts >= DATE_SUB(NOW(), interval 1 MINUTE)\n interval_myapp = 60000\n\nThis will query your application database every 60 seconds, fetch all the \nmetrics that have changed since then and send them through StatsD.\nObviously you need to whitelist them via the metrics section below.\n\nMetrics\n-------\nThe metrics section is basically a whitelisting of all metrics you wish to \nsend to Graphite via StatsD. Currently there is no possibilty to whitelist all \npossible metrics, but there is a special case where we do allow wildcarding:\nfor the bufferpool\\_* we whitelist all bufferpools with that specific metric.\nDon't worry if you haven't configured multiple bufferpools: the output will \nbe omitted by InnoDB and also not parsed by the preprocessor.\n\nImportant to know about the metrics is that you will have to specify what type \nthey are. By default Graphite stores all metric equaly but treats them \ndifferently per type:\n\n- Gauge (g for gauge)\n- Rate (r for raw, d for delta)\n- Timer (t for timer)\n\nGauges are sticky values (like the spedometer in your car). Rates are the \nnumber of units that need to be translated to units per second. Timers are \nthe time it took to perform a certain task.\n\nAn ever increasing value like the com\\_select can be sent various ways. If you \nwish to retain the absolute value of the com_select it is advised to configure \nit as a gauge. However if you are going to use it as a rate (queries per \nsecond) it is no use storing it as a rate in the first place and then later \non calculate the integral of the gauge to get the rate. It would be far more \naccurate to store it as a rate in the first place. \n\nKeep in mind that sending the com\\_select value as a raw value is in this case \na bad habit: StatsD will average out the collected metrics per second, so \nsending within a 10 second timeframe 10 times a value of 1,000,000 will average \nout to the expected 1,000,000. However as the processing of metrics also takes \na bit of time the chance of missing one beat is relatively high and you end up\nsending only 9 times the value, hence averaging out to 900,000 once in a while.\n\nThe best way to configure the com_select to a rate is by defining it as a delta.\nThe delta metric will remember the metric as it was during the previous run and \nwill only send the difference of the two values.\n\n\n\nMedia:\n======\n\nArt gave a talk about this tool at Percona London 2013:\nhttp://www.percona.com/live/mysql-conference-2013/sessions/mysql-performance-monitoring-using-statsd-and-graphite\n\nContributors\n------------\n\nspil-jasper\n\nthijsdezoete\n\nart-spilgames\n\nbnkr\n\n\n\n\nHistory\n-------\n\n0.1.5 (2013-08-30)\n++++++++++++++++++\n\n* Support socket config\n* Add innodb preprocessor update\n\n\n0.1.1 (2013-08-30)\n++++++++++++++++++\n\n* Preparing package for sdist releases\n\n0.1.0 (2013-08-30)\n++++++++++++++++++\n\n* First release on PyPI.",
"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/spilgames/mysql-statsd",
"keywords": "mysql_statsd",
"license": "BSD",
"maintainer": null,
"maintainer_email": null,
"name": "mysql-statsd",
"package_url": "https://pypi.org/project/mysql-statsd/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/mysql-statsd/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/spilgames/mysql-statsd"
},
"release_url": "https://pypi.org/project/mysql-statsd/0.1.5/",
"requires_dist": null,
"requires_python": null,
"summary": "Daemon that gathers statistics from MySQL and sends them to statsd.",
"version": "0.1.5"
},
"last_serial": 1865204,
"releases": {
"0.1.0": [
{
"comment_text": "",
"digests": {
"md5": "3e566889e7aa6039b13a0c96abc5670a",
"sha256": "b05f52aa9c6f6fbc6ae07f3850f3db25e106a1dadcfacfd1acae20afc846be2b"
},
"downloads": -1,
"filename": "mysql-statsd-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "3e566889e7aa6039b13a0c96abc5670a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8180,
"upload_time": "2014-04-13T23:28:55",
"url": "https://files.pythonhosted.org/packages/4e/20/2ae9d04a7f75e5e4f3880c6c16950f6ea7a6da92b6bbc420c2a4eee9ebc5/mysql-statsd-0.1.0.tar.gz"
}
],
"0.1.1": [
{
"comment_text": "",
"digests": {
"md5": "699b4a6068c3fd34dbbb58604c6a18ef",
"sha256": "8cf04e557f0177249f9546d89e60d6ba0b52a3b36d7175597ac847cc93d8d1cf"
},
"downloads": -1,
"filename": "mysql-statsd-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "699b4a6068c3fd34dbbb58604c6a18ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12336,
"upload_time": "2014-04-14T07:11:37",
"url": "https://files.pythonhosted.org/packages/c1/50/25e0a801acefc06aa12a8ef523655353ed760f9f88af27801f7eb82120fb/mysql-statsd-0.1.1.tar.gz"
}
],
"0.1.2": [
{
"comment_text": "built for Darwin-13.3.0",
"digests": {
"md5": "1d21713dfc4dee09d67fe9a56eea9327",
"sha256": "49136e1b7084b2714fa588faa160aa443a0b291c4d1c502e95c30327d551b871"
},
"downloads": -1,
"filename": "mysql-statsd-0.1.2.macosx-10.8-x86_64.tar.gz",
"has_sig": false,
"md5_digest": "1d21713dfc4dee09d67fe9a56eea9327",
"packagetype": "bdist_dumb",
"python_version": "any",
"requires_python": null,
"size": 20054,
"upload_time": "2014-09-08T12:50:08",
"url": "https://files.pythonhosted.org/packages/55/10/a1377838ca44bbe0dfc8cfd2c4b8d103e8fee628ce906611c9c9c69ffa03/mysql-statsd-0.1.2.macosx-10.8-x86_64.tar.gz"
},
{
"comment_text": "",
"digests": {
"md5": "a7e7b1f76a6e544b90c0c78c803c368f",
"sha256": "9e891a22d9d134a52150047539ecdc141e04bd958874792c661944aa7ed48b37"
},
"downloads": -1,
"filename": "mysql-statsd-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "a7e7b1f76a6e544b90c0c78c803c368f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17083,
"upload_time": "2014-09-08T12:49:09",
"url": "https://files.pythonhosted.org/packages/9f/fb/9a416b16d5384dd67aabab3ec5ea7c56a9bd3b010564d2093b71181f88c3/mysql-statsd-0.1.2.tar.gz"
}
],
"0.1.3": [
{
"comment_text": "",
"digests": {
"md5": "135b2a2406b4bab59b2981cc2d406daa",
"sha256": "3d088b3876bef150f730a334e01ecb19d7f0a8eb14b5fed0a1f30399aa2b1ada"
},
"downloads": -1,
"filename": "mysql-statsd-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "135b2a2406b4bab59b2981cc2d406daa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20969,
"upload_time": "2015-01-20T14:43:46",
"url": "https://files.pythonhosted.org/packages/1f/ea/ada0cda594f9e54527ffffc7820c84f655b58a396c2fc50242176d4ea840/mysql-statsd-0.1.3.tar.gz"
}
],
"0.1.4": [
{
"comment_text": "",
"digests": {
"md5": "1bb1258064282771cdce31b3003e61bb",
"sha256": "ea6a29b593d786e2b7119168a9c631bdcaf04629231fcadb851cfd56407fd762"
},
"downloads": -1,
"filename": "mysql-statsd-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "1bb1258064282771cdce31b3003e61bb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21206,
"upload_time": "2015-02-24T15:00:51",
"url": "https://files.pythonhosted.org/packages/a8/11/57533fcf8ae4f31e5a4db250d62b9bf17279321be7775122dc2db12d6886/mysql-statsd-0.1.4.tar.gz"
}
],
"0.1.5": [
{
"comment_text": "",
"digests": {
"md5": "1af904ccb2c99dd4ed77678072ccc726",
"sha256": "22789090a9583b8c1264a60483ff2d6bd6b963809ce4daba2e6e3a5694876a04"
},
"downloads": -1,
"filename": "mysql-statsd-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "1af904ccb2c99dd4ed77678072ccc726",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 27215,
"upload_time": "2015-12-16T15:23:02",
"url": "https://files.pythonhosted.org/packages/99/4c/7f7a3f1e317ad9d5a1674eff8cf45b20d845b6d8e2a78710155bcd8d9eaa/mysql-statsd-0.1.5.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "1af904ccb2c99dd4ed77678072ccc726",
"sha256": "22789090a9583b8c1264a60483ff2d6bd6b963809ce4daba2e6e3a5694876a04"
},
"downloads": -1,
"filename": "mysql-statsd-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "1af904ccb2c99dd4ed77678072ccc726",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 27215,
"upload_time": "2015-12-16T15:23:02",
"url": "https://files.pythonhosted.org/packages/99/4c/7f7a3f1e317ad9d5a1674eff8cf45b20d845b6d8e2a78710155bcd8d9eaa/mysql-statsd-0.1.5.tar.gz"
}
]
}