Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Basic Graphs

ripienaar edited this page Nov 21, 2011 · 14 revisions

Graphs have a number of global properties and then a number of fields.

Here is a very simple graph:

# graph settings
title   "Combined CPU Usage"
vtitle  "percent"
area    :stacked

# individual fields
field :iowait, :scale => 0.001,
               :color => "red",
               :alias => "IO Wait",
               :data  => "sumSeries(derivative(mw*.munin.cpu.iowait))"

Which produce the following:

basic.png

Graph Settings

The following are all the main graph settings that are accepted

title

This sets the main title at the top of the produced graph

title "A sample graph"

vtitle

The vertical title that is shown along the left y axis of your graph

vtitle "bytes/sec"

width

The physical width of the graph in pixels

width 800

height

The physical height of the graph in pixels

height 600

from and until

The timespan to graph for, this is specific in RRDTool AT-Style time format

from "-2days"
until "-1days"

area

This controls the area mode of the graph. Graphite supports 3 modes at present:

area :all
  • :all - all graph fields are stacked ontop of each other
  • :first - the first field is stacked while the rest are lines
  • :none - everything are lines (default)

description

This is just some text associated with the graph, it is not shown on any graph but dashboards and the like can access this in the ruby code

description "A graph of CPU usage"

hide_legend

The main legend can be force disabled or enabled. By default it will automatically be disabled if graphite thinks its too big but when set to true it will always show and never when set to false

hide_legend true

ymin and ymax

These are the minimum and maximum values of the graph, only points between these will be shown.

ymin 100
ymax 200

draw_null_as_zero

Draw missing data from graphite as 0

draw_null_as_zero true

linewidth

Sets the global line width

linewidth 2

fontsize

Sets the global font size

fontsize 15

fontbold

Set all fonts to bold

fontbold true

## timezone The timezone to convert all data into

timezone Europe\London
Clone this wiki locally