blob: 1aae1e14da95bb4c9430d701e3a7ffaf48fbabee [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
Ales Komarek7a593fa2016-10-22 17:32:35 +020047
Ales Komarekae47c9f2016-10-22 12:30:30 +020048Collector setup
49---------------
50
Ales Komarek7a593fa2016-10-22 17:32:35 +020051Used to aggregate dashboards from monitoring node.
Ales Komarekae47c9f2016-10-22 12:30:30 +020052
53.. code-block:: yaml
54
55 grafana:
56 collector:
57 enabled: true
58
59
Ales Komarek9e054912016-10-22 00:36:50 +020060Client setups
61-------------
62
63Client enforced data sources
64
65.. code-block:: yaml
66
67 grafana:
68 client:
69 enabled: true
70 server:
71 protocol: https
72 host: grafana.host
73 port: 3000
74 token: token
75 datasource:
76 graphite:
77 type: graphite
78 host: mtr01.domain.com
79 protocol: https
Ales Komarek98588222015-12-08 10:43:59 +010080 port: 443
Ales Komarek9e054912016-10-22 00:36:50 +020081 elasticsearch:
82 type: elasticsearch
83 host: log01.domain.com
Ales Komarek5a23b512015-12-08 11:20:02 +010084 port: 80
Ales Komarek5a23b512015-12-08 11:20:02 +010085 index: grafana-dash
Ales Komarek9e054912016-10-22 00:36:50 +020086
Ales Komarek7a593fa2016-10-22 17:32:35 +020087Client defined and enforced dashboard
Ales Komarek9e054912016-10-22 00:36:50 +020088
89.. code-block:: yaml
90
91 grafana:
92 client:
93 enabled: true
94 server:
95 host: grafana.host
96 port: 3000
97 token: token
98 dashboard:
99 system_metrics:
100 title: "Generic system metrics"
101 style: dark
102 editable: false
103 row:
104 top:
105 title: "First row"
106
107Client enforced dashboards defined in salt-mine
108
109.. code-block:: yaml
110
111 grafana:
112 client:
113 enabled: true
Ales Komarekae47c9f2016-10-22 12:30:30 +0200114 remote_data:
115 engine: salt_mine
Ales Komarek9e054912016-10-22 00:36:50 +0200116 server:
117 host: grafana.host
118 port: 3000
119 token: token
120
Ales Komarek7a593fa2016-10-22 17:32:35 +0200121
Ales Komarekae47c9f2016-10-22 12:30:30 +0200122Usage
123=====
124
Ales Komarekd125d512016-10-24 11:00:40 +0200125There's a difference between JSON dashboard representation and models we us.
126The lists used in JSON format [for rows, panels and target] were replaced by
127dictionaries. This form of serialization allows better merging and overrides
128of hierarchical data structures that dashboard models are.
Ales Komarekae47c9f2016-10-22 12:30:30 +0200129
Ales Komarek7a593fa2016-10-22 17:32:35 +0200130The default format of Grafana dashboards with lists for rows, panels and targets.
Ales Komarekae47c9f2016-10-22 12:30:30 +0200131
132.. code-block:: yaml
133
134 system_metrics:
135 title: graph
136 editable: true
137 hideControls: false
138 rows:
139 - title: Usage
140 height: 250px
141 panels:
142 - title: Panel Title
143 span: 6
144 editable: false
145 type: graph
146 targets:
147 - refId: A
148 target: "support_prd.cfg01_iot_tcpcloud_eu.cpu.0.idle"
149 datasource: graphite01
150 renderer: flot
151 showTitle: true
152
Ales Komarekd125d512016-10-24 11:00:40 +0200153The modified version of Grafana dashboard format with dictionary declarations.
154Please note that dictionary keys are only for logical separation and are not
155displayed in generated dashboards.
Ales Komarek7a593fa2016-10-22 17:32:35 +0200156
Ales Komarekae47c9f2016-10-22 12:30:30 +0200157.. code-block:: yaml
158
159 system_metrics:
Ales Komarek7a593fa2016-10-22 17:32:35 +0200160 system_metrics2:
161 title: graph
162 editable: true
163 hideControls: false
164 row:
165 usage:
166 title: Usage
167 height: 250px
168 panel:
169 usage-panel:
170 title: Panel Title
171 span: 6
172 editable: false
173 type: graph
174 target:
175 A:
176 refId: A
177 target: "support_prd.cfg01_iot_tcpcloud_eu.cpu.0.idle"
178 datasource: graphite01
179 renderer: flot
180 showTitle: true
Ales Komarekae47c9f2016-10-22 12:30:30 +0200181
Ales Komarek9e054912016-10-22 00:36:50 +0200182
Ales Komarek86490892015-12-04 16:43:48 +0100183Read more
184=========
Ales Komarek4b6c8662014-02-24 21:48:29 +0100185
186* http://grafana.org/
Ales Komarek5a23b512015-12-08 11:20:02 +0100187* http://docs.grafana.org/reference/export_import/