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

Basic Graphs

luxflux edited this page Aug 28, 2012 · 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 filled
  • :first - the first field is stacked while the rest are lines
  • :stacked - all graph fields are filled and stacked ontop of each other
  • :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

yunit_system

The unit system for thousands, millions, etc. Graphite supports 3 systems at present:

yunit_system: binary
  • :si - powers of 1000 - K, M, G, T, P
  • :binary - powers of 1024 - Ki, Mi, Gi, Ti, Pi
  • :none - no interpretation (raw numbers)

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

fontname

Set the name of the global font

fontname "mono"

timezone

The timezone to convert all data into

timezone Europe\London

linemode

Influence how all lines are drawn

linemode :slope

or

linemode :staircase

hide_grid

Disables the grid on the graph

 hide_grid false

major_grid_line_color and minor_grid_line_color

Adjusts the colors for the grid lines

minor_grid_line_color "green"
minor_grid_line_color "#000"
Clone this wiki locally