What’s this?

This app is kind of higher layer on rrdtool, allowing anything rrdtool allows,
but in easier to manage form.

Why?

RRDTool itself is great tool, but it’s quite time consuming task to prepare
graph with it directly. On the other side, there are many bigger or lesser
(often all-in-one, and mostly web-oriented) applications, but they’re
enforcing theirs philosophy, and having annoying “features”.

How it works?

That would output file graph_400x100.png in current directory, containing
disk space utilization graph. Of course, you have to have df-root/ directory
with rrd files (generated with collectd - df plugin).

In this example, sistagen reads configuration from stdin. Thats because
no input files was given. You can pass as many files as you want, just by
giving they names of absolute path (TODO: describe more about pathes).

sistagen config1.conf config2.conf […]

Installation

Just type:

easy_install sistagen

Configuration

Sistagen configuration consists of list of declarations and attributes.

Available declarations:

include ARG - load and parse configuration from another file, given

as ARG

template NAME - create new template (named NAME)

graph NAME - create new graph

theme NAME - color theme definition

Both graph and template means almost the same, with one difference:
template isn’t graphed, it’s only ‘virtual’ declaration, while all graph
declarations causes sistagen to plot them out.

Graph (and template) declarations should have some attributes. An attribute
in sistagen configuration is line, starting with at last one whitespace and
beginning with keyword, followed by number of named values.
It’s important that attribute must always refer to declaration, so:
1. all attributes that follows a declaration, belongs to that declaration
2. it’s an error to pass attributes before any declaration

In its simplest case it looks like following:

GRAPH|TEMPLATE name
attribute1 name=val ...
attribute2 ...
...

Most of attributes should have named values (except of ‘use’, ‘merge’ and ‘size’).
Each value should be in form: “name value” or “name=value” (the equation
symbol is optional).

List of allowed attributes

use template-name - use template as current declaration base

merge template-name [separator=S] - merge this declaration with the one given (see: difference between merge and use)

gprint text TEXT (with EXPR | use NAME) get AGGR
currently supported graphing methods
for lines and areas there should be at last one of ‘with’ or ‘use’
keyword with corresponding value
EXPR means any rpn expression (http://oss.oetiker.ch/rrdtool/doc/rrdgraph_rpn.en.html)
NAME means any input name defined earlier
AGGR means an aggregation function (one of CF)

comment text TEXT

Graph and template declarations may be inherited. It means that when
one declaration inherits another then all attributes of parent would
be copied into child.

Example:

Template A:
attribute a
Template B:
use A # use A as base
# attribue a is defined already

Merge vs Use attributes

Use is generally used in the terms of inheritance. That means, it’ll cause to copy
all attributes from ‘parent’. Also, ‘use’ will override any existing values.
Merge on the other side, will NOT override any values, and will copy only
input and graph declarations.

In summary: use is used in inheritance, merge is used in combining graphs.

Output filename

OUTPUT-MASK may contain several keywords, that would be replaced during graph
generation. They are:

%(width)i - will be replaced with current graph width

%(height)i - as above, but height

%(name)s - current graph (declaration) name

%(date_[from|to]_[full|date|time|year|month|day|hour|minute|second|days|hours|minutes|seconds])s
the date of graphing period start (from) or end (to) which contains YYYYMMDDHHmmss (full)
YYYYMMDD (date), HHmmss (time), or one of those components.
days, hours, minutes and seconds meands time delta between given date and now

Default output mask looks like: _%(width)ix%(height)i

Color theme

It is possible to define a “color theme” that defines colors per
each graph element. Each one by default uses color=auto declaration,
and in such situation sistagen pulls next available color from color
theme (if number of graph elements outnumbers colors in color definition
- random color is generated).

Color defines new color definition, that would be used by graph elements when
color=auto is set. It is possible to define any number of colors in theme declaration.

Available values:

value - color RGB or RGBA value

alpha - alpha value (overrides alpha part from RGBA value)

for - use this color only for mathing graph element (default=all)

Date period definition

It’s possible to plot several graphs at once, each containing data from different
periods. It is done by defining desired DATEs’ in graph definition.

Each DATE entry have form: FROM-TO
The ‘TO’ part may be left, so it would be assigned as ‘now’.
and each FROM and TO can be relative or absolute date definition.
Relative date definitions are in form: NU - N - number, U - unit, for example:
10h, 5m, 3d, and so. Available units: s, m, h, d

Absolute date definitions are in form: [[YY]YYMMDD]HHmm[ss]
year may be set as full year (2014) or shortened (14).
The date part may be omitted, only time part left (HHmmss), also, seconds are
not necessary.

Examples:

date 7d # plot graph from last week
date 2d-1d # and from yesterday
date 30d-20140331 # show stats from march

Templates

There are some templates already prepared and shipped with applications, that
lets fast and easy graph creation.
Right now they are mostly focused on rrd files created by collectd, so with
those files you may just create graph with only input-dir attribute.

Templates dir and current dir are added to config path (-C) by default.

Collectd

Right now, all of the templates defined are prepared for stats generated by
collectd daemon.