blob: f806ffee1cb1398cfb4a03bab4dc7b484b252e19 [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 Thouvenin2958bda2016-11-08 11:55:55 +010047Server installed with default StackLight JSON dashboards. This will
48be replaced by the possibility for a service to provide its own dashboard
49using salt-mine.
Guillaume Thouvenin70ca6672016-10-26 11:25:37 +020050
51.. code-block:: yaml
52
53 grafana:
54 server:
55 enabled: true
Guillaume Thouvenin70ca6672016-10-26 11:25:37 +020056 dashboards:
57 enabled: true
58 path: /var/lib/grafana/dashboards
59
Ales Komarek3f044b22016-10-30 00:27:24 +020060Server with theme overrides
61
62.. code-block:: yaml
63
64 grafana:
65 server:
66 enabled: true
67 theme:
68 light:
69 css_override:
70 source: http://path.to.theme
71 source_hash: sha256=xyz
72 build: xyz
73 dark:
74 css_override:
75 source: salt://path.to.theme
76
Ales Komarek7a593fa2016-10-22 17:32:35 +020077
Ales Komarekae47c9f2016-10-22 12:30:30 +020078Collector setup
79---------------
80
Ales Komarek7a593fa2016-10-22 17:32:35 +020081Used to aggregate dashboards from monitoring node.
Ales Komarekae47c9f2016-10-22 12:30:30 +020082
83.. code-block:: yaml
84
85 grafana:
86 collector:
87 enabled: true
88
89
Ales Komarek9e054912016-10-22 00:36:50 +020090Client setups
91-------------
92
Ales Komarek3f044b22016-10-30 00:27:24 +020093Client with token based auth
Ales Komarek9e054912016-10-22 00:36:50 +020094
95.. code-block:: yaml
96
97 grafana:
98 client:
99 enabled: true
100 server:
101 protocol: https
102 host: grafana.host
103 port: 3000
104 token: token
Ales Komarek3f044b22016-10-30 00:27:24 +0200105
106Client with base auth
107
108.. code-block:: yaml
109
110 grafana:
111 client:
112 enabled: true
113 server:
114 protocol: https
115 host: grafana.host
116 port: 3000
117 user: admin
118 password: password
119
120Client enforcing graphite data source
121
122.. code-block:: yaml
123
124 grafana:
125 client:
126 enabled: true
Ales Komarek9e054912016-10-22 00:36:50 +0200127 datasource:
128 graphite:
129 type: graphite
130 host: mtr01.domain.com
131 protocol: https
Ales Komarek98588222015-12-08 10:43:59 +0100132 port: 443
Ales Komarek3f044b22016-10-30 00:27:24 +0200133
134Client enforcing elasticsearch data source
135
136.. code-block:: yaml
137
138 grafana:
139 client:
140 enabled: true
141 datasource:
Ales Komarek9e054912016-10-22 00:36:50 +0200142 elasticsearch:
143 type: elasticsearch
144 host: log01.domain.com
Ales Komarek5a23b512015-12-08 11:20:02 +0100145 port: 80
Ales Komarek5a23b512015-12-08 11:20:02 +0100146 index: grafana-dash
Ales Komarek9e054912016-10-22 00:36:50 +0200147
Ales Komarek7a593fa2016-10-22 17:32:35 +0200148Client defined and enforced dashboard
Ales Komarek9e054912016-10-22 00:36:50 +0200149
150.. code-block:: yaml
151
152 grafana:
153 client:
154 enabled: true
155 server:
156 host: grafana.host
157 port: 3000
158 token: token
159 dashboard:
160 system_metrics:
161 title: "Generic system metrics"
162 style: dark
163 editable: false
164 row:
165 top:
166 title: "First row"
167
168Client enforced dashboards defined in salt-mine
169
170.. code-block:: yaml
171
172 grafana:
173 client:
174 enabled: true
Ales Komarekae47c9f2016-10-22 12:30:30 +0200175 remote_data:
176 engine: salt_mine
Ales Komarek9e054912016-10-22 00:36:50 +0200177 server:
178 host: grafana.host
179 port: 3000
180 token: token
181
Ales Komarek7a593fa2016-10-22 17:32:35 +0200182
Ales Komarekae47c9f2016-10-22 12:30:30 +0200183Usage
184=====
185
Ales Komarekd125d512016-10-24 11:00:40 +0200186There's a difference between JSON dashboard representation and models we us.
187The lists used in JSON format [for rows, panels and target] were replaced by
188dictionaries. This form of serialization allows better merging and overrides
189of hierarchical data structures that dashboard models are.
Ales Komarekae47c9f2016-10-22 12:30:30 +0200190
Ales Komarek7a593fa2016-10-22 17:32:35 +0200191The default format of Grafana dashboards with lists for rows, panels and targets.
Ales Komarekae47c9f2016-10-22 12:30:30 +0200192
193.. code-block:: yaml
194
195 system_metrics:
196 title: graph
197 editable: true
198 hideControls: false
199 rows:
200 - title: Usage
201 height: 250px
202 panels:
203 - title: Panel Title
204 span: 6
205 editable: false
206 type: graph
Guillaume Thouvenin2958bda2016-11-08 11:55:55 +0100207 targets:
Ales Komarekae47c9f2016-10-22 12:30:30 +0200208 - refId: A
209 target: "support_prd.cfg01_iot_tcpcloud_eu.cpu.0.idle"
210 datasource: graphite01
211 renderer: flot
212 showTitle: true
213
Ales Komarekd125d512016-10-24 11:00:40 +0200214The modified version of Grafana dashboard format with dictionary declarations.
215Please note that dictionary keys are only for logical separation and are not
216displayed in generated dashboards.
Ales Komarek7a593fa2016-10-22 17:32:35 +0200217
Ales Komarekae47c9f2016-10-22 12:30:30 +0200218.. code-block:: yaml
219
220 system_metrics:
Ales Komarek7a593fa2016-10-22 17:32:35 +0200221 system_metrics2:
222 title: graph
223 editable: true
224 hideControls: false
225 row:
226 usage:
227 title: Usage
228 height: 250px
229 panel:
230 usage-panel:
231 title: Panel Title
232 span: 6
233 editable: false
234 type: graph
235 target:
236 A:
237 refId: A
238 target: "support_prd.cfg01_iot_tcpcloud_eu.cpu.0.idle"
239 datasource: graphite01
240 renderer: flot
241 showTitle: true
Ales Komarekae47c9f2016-10-22 12:30:30 +0200242
Ales Komarek9e054912016-10-22 00:36:50 +0200243
Ales Komarek86490892015-12-04 16:43:48 +0100244Read more
245=========
Ales Komarek4b6c8662014-02-24 21:48:29 +0100246
247* http://grafana.org/
Ales Komarek5a23b512015-12-08 11:20:02 +0100248* http://docs.grafana.org/reference/export_import/