Skip to content

rrdtool Documentation

Benedikt Kristinsson edited this page Jan 25, 2015 · 7 revisions

RRDTOOL

We use rrdtool to generate some graphs. The data is currently being written to monitor.log from moitor.pyand contains information on bandwidth usage and usercount.

Links

Setup

Create database

$ rrdtool create monitor_db.rrd \           
    --step 900 \     
    --start 1404249670 \
    DS:bandwidth:GAUGE:3600:0:1000 \
    DS:usercount:GAUGE:8000:0:1000 \
    RRA:MAX:0.5:1:140160
$

Update

The program monitor.py is running with a cronjob and invokes rrdtool update with the appropriate parameters.

Currently, the databse expects a new value every 15 mins but we might decrease the time interval some time. (Not sure if 15 mins is detailed "enough")

Import from logfile

I was collecting data to monitor.log for 6 months before i started using rrdtool. Here is how I imported it to a RRD database.

  1. Create database as per above

  2. Import with monitorparser.py tool

  3. Generate some graphs with grap.sh.

I will probably have to re-import the log file if I add fields or decrease the interval.