blob: 0dcb4c0d7d5127f229107ec659c2391a9178bbb1 [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
Guillaume Thouvenin54a1b742016-12-13 10:08:32 +010016Server installed from system package and listening on 1.2.3.4:3000 (the default
17is 0.0.0.0:3000)
Ales Komarek9e054912016-10-22 00:36:50 +020018
19.. code-block:: yaml
Michael Kutýa79bbdb2014-03-03 20:46:34 +010020
21 grafana:
22 server:
23 enabled: true
Guillaume Thouvenin54a1b742016-12-13 10:08:32 +010024 bind:
25 address: 1.2.3.4
26 port: 3000
Ales Komarek9e054912016-10-22 00:36:50 +020027 admin:
28 user: admin
29 password: passwd
30 database:
31 engine: sqlite
32
33Server installed with PostgreSQL database
34
35.. code-block:: yaml
36
37 grafana:
38 server:
39 enabled: true
40 admin:
41 user: admin
42 password: passwd
Ales Komarek98588222015-12-08 10:43:59 +010043 database:
44 engine: postgresql
Michael Kutýa79bbdb2014-03-03 20:46:34 +010045 host: localhost
Ales Komarek98588222015-12-08 10:43:59 +010046 port: 5432
Ales Komarek9e054912016-10-22 00:36:50 +020047 name: grafana
48 user: grafana
49 password: passwd
50
Guillaume Thouvenin377c14c2016-12-05 13:11:53 +010051Server installed with LDAP authentication and all authenticated users are
52administrators
53
54.. code-block:: yaml
55
56 grafana:
57 server:
58 enabled: true
59 admin:
60 user: admin
61 password: passwd
62 auth:
63 ldap:
64 enabled: true
65 host: '127.0.0.1'
66 port: 389
67 use_ssl: false
68 bind_dn: "cn=admin,dc=grafana,dc=org"
69 bind_password: "grafana"
70 user_search_filter: "(cn=%s)"
71 user_search_base_dns:
72 - "dc=grafana,dc=org"
73
74Server installed with LDAP and basic authentication
75
76.. code-block:: yaml
77
78 grafana:
79 server:
80 enabled: true
81 admin:
82 user: admin
83 password: passwd
84 auth:
85 basic:
86 enabled: true
87 ldap:
88 enabled: true
89 host: '127.0.0.1'
90 port: 389
91 use_ssl: false
92 bind_dn: "cn=admin,dc=grafana,dc=org"
93 bind_password: "grafana"
94 user_search_filter: "(cn=%s)"
95 user_search_base_dns:
96 - "dc=grafana,dc=org"
97
98Server installed with LDAP for authentication and authorization
99
100.. code-block:: yaml
101
102 grafana:
103 server:
104 enabled: true
105 admin:
106 user: admin
107 password: passwd
108 auth:
109 ldap:
110 enabled: true
111 host: '127.0.0.1'
112 port: 389
113 use_ssl: false
114 bind_dn: "cn=admin,dc=grafana,dc=org"
115 bind_password: "grafana"
116 user_search_filter: "(cn=%s)"
117 user_search_base_dns:
118 - "dc=grafana,dc=org"
119 group_search_filter: "(&(objectClass=posixGroup)(memberUid=%s))"
120 group_search_base_dns:
121 - "ou=groups,dc=grafana,dc=org"
122 authorization:
123 enabled: true
124 admin_group: "admins"
125 editor_group: "editors"
126 viewer_group: "viewers"
127
Guillaume Thouvenin2958bda2016-11-08 11:55:55 +0100128Server installed with default StackLight JSON dashboards. This will
129be replaced by the possibility for a service to provide its own dashboard
130using salt-mine.
Guillaume Thouvenin70ca6672016-10-26 11:25:37 +0200131
132.. code-block:: yaml
133
134 grafana:
135 server:
136 enabled: true
Guillaume Thouvenin70ca6672016-10-26 11:25:37 +0200137 dashboards:
138 enabled: true
139 path: /var/lib/grafana/dashboards
140
Ales Komarek3f044b22016-10-30 00:27:24 +0200141Server with theme overrides
142
143.. code-block:: yaml
144
145 grafana:
146 server:
147 enabled: true
148 theme:
149 light:
150 css_override:
151 source: http://path.to.theme
152 source_hash: sha256=xyz
153 build: xyz
154 dark:
155 css_override:
156 source: salt://path.to.theme
157
Guillaume Thouvenin22c462b2017-03-09 17:01:26 +0100158Server with two additionals plugins. It requires to have access to the Internet.
159
160.. code-block:: yaml
161
162 grafana:
163 server:
164 enabled: true
165 plugins:
166 grafana-piechart-panel:
167 enabled: true
168 grafana-example-app:
169 enabled: true
Ales Komarek7a593fa2016-10-22 17:32:35 +0200170
Ales Komarekae47c9f2016-10-22 12:30:30 +0200171Collector setup
172---------------
173
Ales Komarek7a593fa2016-10-22 17:32:35 +0200174Used to aggregate dashboards from monitoring node.
Ales Komarekae47c9f2016-10-22 12:30:30 +0200175
176.. code-block:: yaml
177
178 grafana:
179 collector:
180 enabled: true
181
182
Ales Komarek9e054912016-10-22 00:36:50 +0200183Client setups
184-------------
185
Ales Komarek3f044b22016-10-30 00:27:24 +0200186Client with token based auth
Ales Komarek9e054912016-10-22 00:36:50 +0200187
188.. code-block:: yaml
189
190 grafana:
191 client:
192 enabled: true
193 server:
194 protocol: https
195 host: grafana.host
196 port: 3000
197 token: token
Ales Komarek3f044b22016-10-30 00:27:24 +0200198
199Client with base auth
200
201.. code-block:: yaml
202
203 grafana:
204 client:
205 enabled: true
206 server:
207 protocol: https
208 host: grafana.host
209 port: 3000
210 user: admin
211 password: password
212
213Client enforcing graphite data source
214
215.. code-block:: yaml
216
217 grafana:
218 client:
219 enabled: true
Ales Komarek9e054912016-10-22 00:36:50 +0200220 datasource:
221 graphite:
222 type: graphite
223 host: mtr01.domain.com
224 protocol: https
Ales Komarek98588222015-12-08 10:43:59 +0100225 port: 443
Ales Komarek3f044b22016-10-30 00:27:24 +0200226
227Client enforcing elasticsearch data source
228
229.. code-block:: yaml
230
231 grafana:
232 client:
233 enabled: true
234 datasource:
Ales Komarek9e054912016-10-22 00:36:50 +0200235 elasticsearch:
236 type: elasticsearch
237 host: log01.domain.com
Ales Komarek5a23b512015-12-08 11:20:02 +0100238 port: 80
Ales Komarek5a23b512015-12-08 11:20:02 +0100239 index: grafana-dash
Ales Komarek9e054912016-10-22 00:36:50 +0200240
Ales Komarek7a593fa2016-10-22 17:32:35 +0200241Client defined and enforced dashboard
Ales Komarek9e054912016-10-22 00:36:50 +0200242
243.. code-block:: yaml
244
245 grafana:
246 client:
247 enabled: true
248 server:
249 host: grafana.host
250 port: 3000
251 token: token
252 dashboard:
253 system_metrics:
254 title: "Generic system metrics"
255 style: dark
256 editable: false
257 row:
258 top:
259 title: "First row"
260
261Client enforced dashboards defined in salt-mine
262
263.. code-block:: yaml
264
265 grafana:
266 client:
267 enabled: true
Ales Komarekae47c9f2016-10-22 12:30:30 +0200268 remote_data:
269 engine: salt_mine
Ales Komarek9e054912016-10-22 00:36:50 +0200270 server:
271 host: grafana.host
272 port: 3000
273 token: token
274
Ales Komarek7a593fa2016-10-22 17:32:35 +0200275
Ales Komarekae47c9f2016-10-22 12:30:30 +0200276Usage
277=====
278
Ales Komarekd125d512016-10-24 11:00:40 +0200279There's a difference between JSON dashboard representation and models we us.
280The lists used in JSON format [for rows, panels and target] were replaced by
281dictionaries. This form of serialization allows better merging and overrides
282of hierarchical data structures that dashboard models are.
Ales Komarekae47c9f2016-10-22 12:30:30 +0200283
Ales Komarek7a593fa2016-10-22 17:32:35 +0200284The default format of Grafana dashboards with lists for rows, panels and targets.
Ales Komarekae47c9f2016-10-22 12:30:30 +0200285
286.. code-block:: yaml
287
288 system_metrics:
289 title: graph
290 editable: true
291 hideControls: false
292 rows:
293 - title: Usage
294 height: 250px
295 panels:
296 - title: Panel Title
297 span: 6
298 editable: false
299 type: graph
Guillaume Thouvenin2958bda2016-11-08 11:55:55 +0100300 targets:
Ales Komarekae47c9f2016-10-22 12:30:30 +0200301 - refId: A
302 target: "support_prd.cfg01_iot_tcpcloud_eu.cpu.0.idle"
303 datasource: graphite01
304 renderer: flot
305 showTitle: true
306
Ales Komarekd125d512016-10-24 11:00:40 +0200307The modified version of Grafana dashboard format with dictionary declarations.
308Please note that dictionary keys are only for logical separation and are not
309displayed in generated dashboards.
Ales Komarek7a593fa2016-10-22 17:32:35 +0200310
Ales Komarekae47c9f2016-10-22 12:30:30 +0200311.. code-block:: yaml
312
313 system_metrics:
Ales Komarek7a593fa2016-10-22 17:32:35 +0200314 system_metrics2:
315 title: graph
316 editable: true
317 hideControls: false
318 row:
319 usage:
320 title: Usage
321 height: 250px
322 panel:
323 usage-panel:
324 title: Panel Title
325 span: 6
326 editable: false
327 type: graph
328 target:
329 A:
330 refId: A
331 target: "support_prd.cfg01_iot_tcpcloud_eu.cpu.0.idle"
332 datasource: graphite01
333 renderer: flot
334 showTitle: true
Ales Komarekae47c9f2016-10-22 12:30:30 +0200335
Ales Komarek9e054912016-10-22 00:36:50 +0200336
Ales Komarek86490892015-12-04 16:43:48 +0100337Read more
338=========
Ales Komarek4b6c8662014-02-24 21:48:29 +0100339
340* http://grafana.org/
Ales Komarek5a23b512015-12-08 11:20:02 +0100341* http://docs.grafana.org/reference/export_import/
Filip Pytloun9e431b02017-02-02 13:02:03 +0100342
343Documentation and Bugs
344======================
345
346To learn how to install and update salt-formulas, consult the documentation
347available online at:
348
349 http://salt-formulas.readthedocs.io/
350
351In the unfortunate event that bugs are discovered, they should be reported to
352the appropriate issue tracker. Use Github issue tracker for specific salt
353formula:
354
355 https://github.com/salt-formulas/salt-formula-grafana/issues
356
357For feature requests, bug reports or blueprints affecting entire ecosystem,
358use Launchpad salt-formulas project:
359
360 https://launchpad.net/salt-formulas
361
362You can also join salt-formulas-users team and subscribe to mailing list:
363
364 https://launchpad.net/~salt-formulas-users
365
366Developers wishing to work on the salt-formulas projects should always base
367their work on master branch and submit pull request against specific formula.
368
369 https://github.com/salt-formulas/salt-formula-grafana
370
371Any questions or feedback is always welcome so feel free to join our IRC
372channel:
373
374 #salt-formulas @ irc.freenode.net