Skip to main content

Daemon that gathers statistics from MySQL and sends them to statsd.

Project description

===============================
mysql-statsd
===============================

.. image:: https://badge.fury.io/py/mysql-statsd.png
:target: http://badge.fury.io/py/mysql-statsd

.. image:: https://travis-ci.org/spilgames/mysql-statsd.png?branch=master
:target: https://travis-ci.org/spilgames/mysql-statsd

.. image:: https://pypip.in/d/mysql-statsd/badge.png
:target: https://crate.io/packages/mysql-statsd?version=latest

Daemon that gathers statistics from MySQL and sends them to statsd.

- Free software: BSD license
- Documentation: http://mysql-statsd.rtfd.org.

Usage / Installation
====================

Install mysql\_statsd through pip(pip is a python package manager,
please don't use sudo!):

::

pip install mysql_statsd

If all went well, you'll now have a new executable called mysql\_statsd
in your path.

Running mysql\_statsd
---------------------

::

$ mysql_statsd --config /etc/mysql-statsd.conf

Assuming you placed a config file in /etc/ named mysql-statsd.conf

See our example
`configuration <https://github.com/spilgames/mysql-statsd/blob/master/docs/mysql-statsd.conf>`__

Running the above command will start mysql\_statsd in deamon mode. If
you wish to see it's output, then run the command with -f / --foreground

Usage
-----

::

$ mysql_statsd --help
usage: mysql_statsd.py [-h] [-c FILE] [-d] [-f]

optional arguments:
-h, --help show this help message and exit
-c FILE, --config FILE
Configuration file
-d, --debug Debug mode
-f, --foreground Dont fork main program

At the moment there is also a `deamon
script <https://github.com/spilgames/mysql-statsd/blob/master/docs/mysql_statsd>`_
for this package

You're more than welcome to help us improve it!

Platforms
---------

We would love to support many other kinds of database servers, but
currently we're supporting these:

- MySQL 5.1
- MySQL 5.5
- Galera

Both MySQL versions supported with Percona flavour as well as vanilla.

Todo:
~~~~~

Support for the following platforms

- Mysql 5.6
- MariaDB

We're looking forward to your pull request for other platforms

Development installation
------------------------

To install package, setup a `python virtual
environment <http://docs.python-guide.org/en/latest/dev/virtualenvs/>`_

Install the requirements(once the virtual environment is active):

::

pip install -r requirements.txt

*NOTE: MySQL-Python package needs mysql\_config command to be in your
path.*

There are future plans to replace the mysql-python package with
`PyMySQL <https://github.com/PyMySQL/PyMySQL>`_

After that you're able to run the script through

::

$ python mysql_statsd/mysql_statsd.py

Coding standards
----------------

We like to stick with the python standard way of working:
`PEP-8 <http://legacy.python.org/dev/peps/pep-0008/>`_

Media:
======

Art gave a talk about this tool at Percona London 2013:
http://www.percona.com/live/mysql-conference-2013/sessions/mysql-performance-monitoring-using-statsd-and-graphite

Contributors
------------

spil-jasper

thijsdezoete

art-spilgames




History
-------

0.1.1 (2013-08-30)
++++++++++++++++++

* Preparing package for sdist releases

0.1.0 (2013-08-30)
++++++++++++++++++

* First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mysql-statsd-0.1.2.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

mysql-statsd-0.1.2.macosx-10.8-x86_64.tar.gz (20.1 kB view details)

Uploaded Source

File details

Details for the file mysql-statsd-0.1.2.tar.gz.

File metadata

File hashes

Hashes for mysql-statsd-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9e891a22d9d134a52150047539ecdc141e04bd958874792c661944aa7ed48b37
MD5 a7e7b1f76a6e544b90c0c78c803c368f
BLAKE2b-256 9ffb9a416b16d5384dd67aabab3ec5ea7c56a9bd3b010564d2093b71181f88c3

See more details on using hashes here.

File details

Details for the file mysql-statsd-0.1.2.macosx-10.8-x86_64.tar.gz.

File metadata

File hashes

Hashes for mysql-statsd-0.1.2.macosx-10.8-x86_64.tar.gz
Algorithm Hash digest
SHA256 49136e1b7084b2714fa588faa160aa443a0b291c4d1c502e95c30327d551b871
MD5 1d21713dfc4dee09d67fe9a56eea9327
BLAKE2b-256 5510a1377838ca44bbe0dfc8cfd2c4b8d103e8fee628ce906611c9c9c69ffa03

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page