blob: fcbdef8af1d19854e8f3e9f875929ecbe1c8e9bb [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
Guillaume Thouvenin70ca6672016-10-26 11:25:37 +020054 dashboards:
55 enabled: true
56 path: /var/lib/grafana/dashboards
57
Ales Komarek3f044b22016-10-30 00:27:24 +020058Server with theme overrides
59
60.. code-block:: yaml
61
62 grafana:
63 server:
64 enabled: true
65 theme:
66 light:
67 css_override:
68 source: http://path.to.theme
69 source_hash: sha256=xyz
70 build: xyz
71 dark:
72 css_override:
73 source: salt://path.to.theme
74
Ales Komarek7a593fa2016-10-22 17:32:35 +020075
Ales Komarekae47c9f2016-10-22 12:30:30 +020076Collector setup
77---------------
78
Ales Komarek7a593fa2016-10-22 17:32:35 +020079Used to aggregate dashboards from monitoring node.
Ales Komarekae47c9f2016-10-22 12:30:30 +020080
81.. code-block:: yaml
82
83 grafana:
84 collector:
85 enabled: true
86
87
Ales Komarek9e054912016-10-22 00:36:50 +020088Client setups
89-------------
90
Ales Komarek3f044b22016-10-30 00:27:24 +020091Client with token based auth
Ales Komarek9e054912016-10-22 00:36:50 +020092
93.. code-block:: yaml
94
95 grafana:
96 client:
97 enabled: true
98 server:
99 protocol: https
100 host: grafana.host
101 port: 3000
102 token: token
Ales Komarek3f044b22016-10-30 00:27:24 +0200103
104Client with base auth
105
106.. code-block:: yaml
107
108 grafana:
109 client:
110 enabled: true
111 server:
112 protocol: https
113 host: grafana.host
114 port: 3000
115 user: admin
116 password: password
117
118Client enforcing graphite data source
119
120.. code-block:: yaml
121
122 grafana:
123 client:
124 enabled: true
Ales Komarek9e054912016-10-22 00:36:50 +0200125 datasource:
126 graphite:
127 type: graphite
128 host: mtr01.domain.com
129 protocol: https
Ales Komarek98588222015-12-08 10:43:59 +0100130 port: 443
Ales Komarek3f044b22016-10-30 00:27:24 +0200131
132Client enforcing elasticsearch data source
133
134.. code-block:: yaml
135
136 grafana:
137 client:
138 enabled: true
139 datasource:
Ales Komarek9e054912016-10-22 00:36:50 +0200140 elasticsearch:
141 type: elasticsearch
142 host: log01.domain.com
Ales Komarek5a23b512015-12-08 11:20:02 +0100143 port: 80
Ales Komarek5a23b512015-12-08 11:20:02 +0100144 index: grafana-dash
Ales Komarek9e054912016-10-22 00:36:50 +0200145
Ales Komarek7a593fa2016-10-22 17:32:35 +0200146Client defined and enforced dashboard
Ales Komarek9e054912016-10-22 00:36:50 +0200147
148.. code-block:: yaml
149
150 grafana:
151 client:
152 enabled: true
153 server:
154 host: grafana.host
155 port: 3000
156 token: token
157 dashboard:
158 system_metrics:
159 title: "Generic system metrics"
160 style: dark
161 editable: false
162 row:
163 top:
164 title: "First row"
165
166Client enforced dashboards defined in salt-mine
167
168.. code-block:: yaml
169
170 grafana:
171 client:
172 enabled: true
Ales Komarekae47c9f2016-10-22 12:30:30 +0200173 remote_data:
174 engine: salt_mine
Ales Komarek9e054912016-10-22 00:36:50 +0200175 server:
176 host: grafana.host
177 port: 3000
178 token: token
179
Ales Komarek7a593fa2016-10-22 17:32:35 +0200180
Ales Komarekae47c9f2016-10-22 12:30:30 +0200181Usage
182=====
183
Ales Komarekd125d512016-10-24 11:00:40 +0200184There's a difference between JSON dashboard representation and models we us.
185The lists used in JSON format [for rows, panels and target] were replaced by
186dictionaries. This form of serialization allows better merging and overrides
187of hierarchical data structures that dashboard models are.
Ales Komarekae47c9f2016-10-22 12:30:30 +0200188
Ales Komarek7a593fa2016-10-22 17:32:35 +0200189The default format of Grafana dashboards with lists for rows, panels and targets.
Ales Komarekae47c9f2016-10-22 12:30:30 +0200190
191.. code-block:: yaml
192
193 system_metrics:
194 title: graph
195 editable: true
196 hideControls: false
197 rows:
198 - title: Usage
199 height: 250px
200 panels:
201 - title: Panel Title
202 span: 6
203 editable: false
204 type: graph
205 targets:
206 - refId: A
207 target: "support_prd.cfg01_iot_tcpcloud_eu.cpu.0.idle"
208 datasource: graphite01
209 renderer: flot
210 showTitle: true
211
Ales Komarekd125d512016-10-24 11:00:40 +0200212The modified version of Grafana dashboard format with dictionary declarations.
213Please note that dictionary keys are only for logical separation and are not
214displayed in generated dashboards.
Ales Komarek7a593fa2016-10-22 17:32:35 +0200215
Ales Komarekae47c9f2016-10-22 12:30:30 +0200216.. code-block:: yaml
217
218 system_metrics:
Ales Komarek7a593fa2016-10-22 17:32:35 +0200219 system_metrics2:
220 title: graph
221 editable: true
222 hideControls: false
223 row:
224 usage:
225 title: Usage
226 height: 250px
227 panel:
228 usage-panel:
229 title: Panel Title
230 span: 6
231 editable: false
232 type: graph
233 target:
234 A:
235 refId: A
236 target: "support_prd.cfg01_iot_tcpcloud_eu.cpu.0.idle"
237 datasource: graphite01
238 renderer: flot
239 showTitle: true
Ales Komarekae47c9f2016-10-22 12:30:30 +0200240
Ales Komarek9e054912016-10-22 00:36:50 +0200241
Ales Komarek86490892015-12-04 16:43:48 +0100242Read more
243=========
Ales Komarek4b6c8662014-02-24 21:48:29 +0100244
245* http://grafana.org/
Ales Komarek5a23b512015-12-08 11:20:02 +0100246* http://docs.grafana.org/reference/export_import/