blob: 26daa016d04b79aaf0c39352c589e97d0b9f6365 [file] [log] [blame]
Ales Komarek4b6c8662014-02-24 21:48:29 +01001
Ales Komarek86490892015-12-04 16:43:48 +01002=======
3Grafana
4=======
Ales Komarek4b6c8662014-02-24 21:48:29 +01005
6A beautiful, easy to use and feature rich Graphite dashboard replacement and graph editor.
7
Ales Komarek7a593fa2016-10-22 17:32:35 +02008
Ales Komarek5a23b512015-12-08 11:20:02 +01009Sample pillars
10==============
Ales Komarek4b6c8662014-02-24 21:48:29 +010011
Ales Komarek7a593fa2016-10-22 17:32:35 +020012
Ales Komarek9e054912016-10-22 00:36:50 +020013Server deployments
14------------------
15
16Server installed from system package
17
18.. code-block:: yaml
Michael Kutýa79bbdb2014-03-03 20:46:34 +010019
20 grafana:
21 server:
22 enabled: true
Ales Komarek9e054912016-10-22 00:36:50 +020023 admin:
24 user: admin
25 password: passwd
26 database:
27 engine: sqlite
28
29Server installed with PostgreSQL database
30
31.. code-block:: yaml
32
33 grafana:
34 server:
35 enabled: true
36 admin:
37 user: admin
38 password: passwd
Ales Komarek98588222015-12-08 10:43:59 +010039 database:
40 engine: postgresql
Michael Kutýa79bbdb2014-03-03 20:46:34 +010041 host: localhost
Ales Komarek98588222015-12-08 10:43:59 +010042 port: 5432
Ales Komarek9e054912016-10-22 00:36:50 +020043 name: grafana
44 user: grafana
45 password: passwd
46
Guillaume Thouvenin70ca6672016-10-26 11:25:37 +020047Server installed with default StackLight JSON dashboards
48
49.. code-block:: yaml
50
51 grafana:
52 server:
53 enabled: true
54 admin:
55 user: admin
56 password: passwd
57 dashboards:
58 enabled: true
59 path: /var/lib/grafana/dashboards
60
Ales Komarek7a593fa2016-10-22 17:32:35 +020061
Ales Komarekae47c9f2016-10-22 12:30:30 +020062Collector setup
63---------------
64
Ales Komarek7a593fa2016-10-22 17:32:35 +020065Used to aggregate dashboards from monitoring node.
Ales Komarekae47c9f2016-10-22 12:30:30 +020066
67.. code-block:: yaml
68
69 grafana:
70 collector:
71 enabled: true
72
73
Ales Komarek9e054912016-10-22 00:36:50 +020074Client setups
75-------------
76
77Client enforced data sources
78
79.. code-block:: yaml
80
81 grafana:
82 client:
83 enabled: true
84 server:
85 protocol: https
86 host: grafana.host
87 port: 3000
88 token: token
89 datasource:
90 graphite:
91 type: graphite
92 host: mtr01.domain.com
93 protocol: https
Ales Komarek98588222015-12-08 10:43:59 +010094 port: 443
Ales Komarek9e054912016-10-22 00:36:50 +020095 elasticsearch:
96 type: elasticsearch
97 host: log01.domain.com
Ales Komarek5a23b512015-12-08 11:20:02 +010098 port: 80
Ales Komarek5a23b512015-12-08 11:20:02 +010099 index: grafana-dash
Ales Komarek9e054912016-10-22 00:36:50 +0200100
Ales Komarek7a593fa2016-10-22 17:32:35 +0200101Client defined and enforced dashboard
Ales Komarek9e054912016-10-22 00:36:50 +0200102
103.. code-block:: yaml
104
105 grafana:
106 client:
107 enabled: true
108 server:
109 host: grafana.host
110 port: 3000
111 token: token
112 dashboard:
113 system_metrics:
114 title: "Generic system metrics"
115 style: dark
116 editable: false
117 row:
118 top:
119 title: "First row"
120
121Client enforced dashboards defined in salt-mine
122
123.. code-block:: yaml
124
125 grafana:
126 client:
127 enabled: true
Ales Komarekae47c9f2016-10-22 12:30:30 +0200128 remote_data:
129 engine: salt_mine
Ales Komarek9e054912016-10-22 00:36:50 +0200130 server:
131 host: grafana.host
132 port: 3000
133 token: token
134
Ales Komarek7a593fa2016-10-22 17:32:35 +0200135
Ales Komarekae47c9f2016-10-22 12:30:30 +0200136Usage
137=====
138
Ales Komarekd125d512016-10-24 11:00:40 +0200139There's a difference between JSON dashboard representation and models we us.
140The lists used in JSON format [for rows, panels and target] were replaced by
141dictionaries. This form of serialization allows better merging and overrides
142of hierarchical data structures that dashboard models are.
Ales Komarekae47c9f2016-10-22 12:30:30 +0200143
Ales Komarek7a593fa2016-10-22 17:32:35 +0200144The default format of Grafana dashboards with lists for rows, panels and targets.
Ales Komarekae47c9f2016-10-22 12:30:30 +0200145
146.. code-block:: yaml
147
148 system_metrics:
149 title: graph
150 editable: true
151 hideControls: false
152 rows:
153 - title: Usage
154 height: 250px
155 panels:
156 - title: Panel Title
157 span: 6
158 editable: false
159 type: graph
160 targets:
161 - refId: A
162 target: "support_prd.cfg01_iot_tcpcloud_eu.cpu.0.idle"
163 datasource: graphite01
164 renderer: flot
165 showTitle: true
166
Ales Komarekd125d512016-10-24 11:00:40 +0200167The modified version of Grafana dashboard format with dictionary declarations.
168Please note that dictionary keys are only for logical separation and are not
169displayed in generated dashboards.
Ales Komarek7a593fa2016-10-22 17:32:35 +0200170
Ales Komarekae47c9f2016-10-22 12:30:30 +0200171.. code-block:: yaml
172
173 system_metrics:
Ales Komarek7a593fa2016-10-22 17:32:35 +0200174 system_metrics2:
175 title: graph
176 editable: true
177 hideControls: false
178 row:
179 usage:
180 title: Usage
181 height: 250px
182 panel:
183 usage-panel:
184 title: Panel Title
185 span: 6
186 editable: false
187 type: graph
188 target:
189 A:
190 refId: A
191 target: "support_prd.cfg01_iot_tcpcloud_eu.cpu.0.idle"
192 datasource: graphite01
193 renderer: flot
194 showTitle: true
Ales Komarekae47c9f2016-10-22 12:30:30 +0200195
Ales Komarek9e054912016-10-22 00:36:50 +0200196
Ales Komarek86490892015-12-04 16:43:48 +0100197Read more
198=========
Ales Komarek4b6c8662014-02-24 21:48:29 +0100199
200* http://grafana.org/
Ales Komarek5a23b512015-12-08 11:20:02 +0100201* http://docs.grafana.org/reference/export_import/