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 Oct 16, 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

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

from "-2days"

until

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

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
Clone this wiki locally