Skip to content

paluh/collectd-rrd-graphs-in-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Collectd rrd graphs examples

This is not a library. This is just a module which contains set of example rrd graphs generators for some standard collectd plugins.

Additionally it contains my pyrrd backend which handles localization - labels on graphs are translated (I'm talking here about legends generated by RRD (for example weekdays)). Of course you can provide translation of all labels but it has to be done in Python code (replace fake ugettext calls from graphs.py with real one).

My pyrrd backend is based on pyrrd.backends.external but I'm going to provide additional one which will extend pyrrd.backend.bindings.

Installation

As it is not an real python library setup.py is missing. If you want to try my generators you should clone this repo and install dependencies (probably in virtualenv):

$ pip install -r REQUIREMENTS

Usage

Testing

You can generate graphs with provided module:

$ python graphs.py --help

Customizing

As I mentioned above this is (intentionally) not really extensible piece of code. This is also (intentionally) not very DRY written piece of code. If you want refactorize/customize anything you should copy desired sections straight into your project and modify them.

Examples

Let's assume that my rrd bases are in ./rrd/host1 directory:

$ python graphs.py cpu --rrd-dir=./rrd/host1/cpu-0 --locale='pl_PL' --end='2013-03-28' -o cpu.png

CPU graph

$ python graphs.py load --rrd-dir=./rrd/host1/load --locale='pl_PL' --end='2013-03-28' -o load.png

CPU graph

$ python graphs.py interface --rrd-dir=./rrd/host1/inteface-eth0 --locale='pl_PL' --end='2013-03-28' -o interface.png

CPU graph

$ python graphs.py memory --rrd-dir=./rrd/host1/memory --locale='pl_PL' --end='2013-03-28' -o memory.png

CPU graph

$ python graphs.py disk --rrd-dir=./rrd/host1/disk-xvda2 --locale='pl_PL' --end='2013-03-28' --logarithmic -o disk.png && gqview disk.png

CPU graph

About

Example set of collectd rrd graphs generators written in python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages