Skip to main content

MySQL table space monitoring.

Project description

# MySQL Table Space Graphing

[![Build Status](https://travis-ci.org/dalenys/mytsgraph.svg?branch=master)]
[![Latest Stable Version](https://poser.pugx.org/be2bill/mytsgraph/v/stable)]
[![Total Downloads](https://poser.pugx.org/be2bill/mytsgraph/downloads)]
[![License](https://poser.pugx.org/be2bill/mytsgraph/license)]

#### Table of contents

1. [Overview] (#overview)
2. [Usage] (#usage)
3. [Notices] (#notices)
4. [Installation] (#installation)
5. [Development] (#development)

## Overview
This program put in statsd (graphite stack) some metrics about your database
tablespaces.

For all your databases, you will have

- data_length: size of the table
- index_length: size of the index
- data_free: free space in table space
- row_count: the (approximative) number of rows

## Usage

```
usage: mytsgraph [-h] --config CONFIG

optional arguments:
-h, --help show this help message and exit
--config CONFIG, -c CONFIG
Configuration file

```

## Notices
BE CAREFUL:
- It could be very slow (especially on heavy loaded servers or servers with a
huge databases/tables count.
You surely want to run this tool on a slave instead of a master

## Installation [pypi link](https://pypi.python.org/pypi/mytsgraph/)

To install it with a [Python virtualenv](http://docs.python-guide.org/en/latest/dev/virtualenvs/)
(recommended):

```
$> virtualenv myenv
$> source myenv/bin/activate
(myenv) $> pip install mytsgraph
(myenv) $> mysql-monitor -h
```

Or on your system, without virtualenv:

```
$> pip install mytsgraph
$> mysql-monitor -h
```

## Retention policy

I suggest to use a not fine grained retention since this script should be used
only a few time a day. Something like this should be enough:

```
[mytsgraph]
pattern = database.*
retentions = 4h:3y
```

## Development

To start hacking on the project, run:

```
$> virtualenv myenv
$> source myenv/bin/activate
(myenv) $> pip install -e .
(myenv) $> mytsgraph -h
```

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

mytsgraph-1.0.0.tar.gz (3.6 kB view hashes)

Uploaded Source

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