-
Notifications
You must be signed in to change notification settings - Fork 43
Basic Graphs
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:
The following are all the main graph settings that are accepted
This sets the main title at the top of the produced graph
title "A sample graph"
The vertical title that is shown along the left y axis of your graph
vtitle "bytes/sec"
The physical width of the graph in pixels
width 800
The physical height of the graph in pixels
height 600
The timespan to graph for, this is specific in RRDTool AT-Style time format
from "-2days"
until "-1days"
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)
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"
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
These are the minimum and maximum values of the graph, only points between these will be shown.
ymin 100
ymax 200
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 missing data from graphite as 0
draw_null_as_zero true
Sets the global line width
linewidth 2
Sets the global font size
fontsize 15
Set all fonts to bold
fontbold true
Set the name of the global font
fontname "mono"
The timezone to convert all data into
timezone Europe\London
Influence how all lines are drawn
linemode :slope
or
linemode :staircase
Disables the grid on the graph
hide_grid false
Adjusts the colors for the grid lines
minor_grid_line_color "green"
minor_grid_line_color "#000"