Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/grafana:readme into ~ubuntu-docker-images/ubuntu-docker-images/+git/grafana:edge

Proposed by Lucas Kanashiro
Status: Merged
Merged at revision: 0462c0caa306e1d4201250bc93662afe388d497b
Proposed branch: ~ubuntu-docker-images/ubuntu-docker-images/+git/grafana:readme
Merge into: ~ubuntu-docker-images/ubuntu-docker-images/+git/grafana:edge
Diff against target: 2633 lines (+2585/-0)
8 files modified
HACKING.md (+14/-0)
README.md.oci (+149/-0)
examples/README.md (+48/-0)
examples/config/dashboard.yml (+12/-0)
examples/config/datasource.yml (+11/-0)
examples/config/system-stats-dashboard.json (+2282/-0)
examples/docker-compose.yml (+11/-0)
examples/grafana-deployment.yml (+58/-0)
Reviewer Review Type Date Requested Status
Lucas Kanashiro Approve
Sergio Durigan Junior Needs Fixing
Review via email: mp+393887@code.launchpad.net

Description of the change

Improve README.

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks for the MP, Lucas. I've found a few nits and small issues that need fixing. Feel free to approve & push it once you address them.

review: Needs Fixing
Revision history for this message
Bryce Harrington (bryce) wrote :

A handful of copyedit suggestions...

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks Sergio and Bryce! The points you raised were addressed. I am going to approve and merge this.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/HACKING.md b/HACKING.md
0new file mode 1006440new file mode 100644
index 0000000..64f8ea3
--- /dev/null
+++ b/HACKING.md
@@ -0,0 +1,14 @@
1# Contributing
2
3In order to contribute to the Grafana OCI image do the following:
4
5* Create a new branch.
6* Make your changes. Keep your commits logically separated. If it is fixing a bug do not forget to mention it in the commit message.
7* Build a new image with your changes. You can use the following command:
8
9```
10$ docker build -t squeakywheel/grafana:test -f Dockerfile .
11```
12
13* Test the new image. Run it in some way that exercises your changes, you can also check the README.md file.
14* If everything goes well submit a merge proposal.
diff --git a/README.md.oci b/README.md.oci
0new file mode 10064415new file mode 100644
index 0000000..99aa87e
--- /dev/null
+++ b/README.md.oci
@@ -0,0 +1,149 @@
1# Grafana | Ubuntu
2
3## About Grafana
4
5Grafana is a feature rich metrics dashboard and graph editor for Cloudwatch, Elasticsearch, Graphite, InfluxDB, OpenTSB, Prometheus, and Hosted Metrics.
6
7## Tags
8
9- `7.0.3-focal`, `7.0.3`, `7.0-focal`, `7.0`, `7-focal`, `7`, `focal`, `beta` - **/!\ this is a beta release**
10
11### Architectures supported
12
13- `amd64`, `arm64`, `ppc64el`, `s390x`
14
15## Usage
16
17### Docker CLI
18
19```sh
20$ docker run --name grafana -p 3000:3000 -d -e TZ=Europe/London squeakywheel/grafana:edge
21```
22
23Since containers are ephemeral, you may want to use persistent data rather than initializing a new database for each newly launched container. To do this, you can use docker volumes:
24
25```sh
26$ docker run --name grafana -v /path/to/persisted/data:/var/lib/grafana squeakywheel/grafana:edge
27```
28
29#### Parameters
30
31| Parameter | Description |
32|---|---|
33| `-e TZ=UTC` | Timezone. |
34| `-v /path/to/grafana/provisioning/files/:/etc/grafana/provisioning/` | Pass a directory with files to provision a Grafana `datasource` and `dashboard`. |
35
36#### Debugging
37
38In case you need to debug what it is happening with the container you can run `docker logs <name_of_the_container>`. For a better experience while checking logs pass `-e GF_LOG_MODE="console file"` when you run the container. Alternatively, for an interactive shell run:
39
40```sh
41$ docker exec -it <name_of_the_container> /bin/bash
42```
43
44## Deploy with Kubernetes
45
46You can use your favorite Kubernetes distribution; if you don't have one, consider [installing MicroK8s](https://microk8s.io/).
47
48With microk8s running, enable the `dns` and `storage` add-ons:
49```sh
50$ microk8s enable dns storage
51 ```
52
53Create a configmap for the provisioning configuration files (check the upstream documentation [here](https://grafana.com/docs/grafana/latest/administration/provisioning/) on how to provision a dashboard):
54
55```sh
56$ microk8s kubectl create configmap grafana-config --from-file=grafana-datasource=config/datasource.yml --from-file=grafana-dashboard-definition=config/dashboard.yml --from-file=grafana-dashboard=config/system-stats-dashboard.json
57```
58
59Use the sample deployment yaml provided [here](https://git.launchpad.net/~canonical-server/ubuntu-server-oci/+git/grafana/plain/examples/grafana-deployment.yml).
60
61<details>
62 <summary>Apply the `grafana-deployment.yml` (click to expand)</summary>
63
64```yaml
65# grafana-deployment.yml
66---
67apiVersion: apps/v1
68kind: Deployment
69metadata:
70 name: grafana-deployment
71spec:
72 replicas: 1
73 selector:
74 matchLabels:
75 app: grafana
76 template:
77 metadata:
78 labels:
79 app: grafana
80 spec:
81 containers:
82 - name: grafana
83 image: squeakywheel/grafana:edge
84 volumeMounts:
85 - name: grafana-config-volume
86 mountPath: /etc/grafana/provisioning/datasources/datasource.yml
87 subPath: datasource.yml
88 - name: grafana-config-volume
89 mountPath: /etc/grafana/provisioning/dashboards/dashboard.yml
90 subPath: dashboard.yml
91 - name: grafana-config-volume
92 mountPath: /etc/grafana/provisioning/dashboards/system-stats-dashboard.json
93 subPath: system-stats-dashboard.json
94 ports:
95 - containerPort: 3000
96 name: grafana
97 protocol: TCP
98 volumes:
99 - name: grafana-config-volume
100 configMap:
101 name: grafana-config
102 items:
103 - key: grafana-datasource
104 path: datasource.yml
105 - key: grafana-dashboard-definition
106 path: dashboard.yml
107 - key: grafana-dashboard
108 path: system-stats-dashboard.json
109---
110apiVersion: v1
111kind: Service
112metadata:
113 name: grafana-service
114spec:
115 type: NodePort
116 selector:
117 app: grafana
118 ports:
119 - protocol: TCP
120 port: 3000
121 targetPort: 3000
122 nodePort: 30000
123 name: grafana
124```
125
126</details>
127
128```sh
129$ microk8s kubectl apply -f grafana-deployment.yml
130```
131
132You will now be able to connect to the Grafana on `http://localhost:30000`.
133
134## Bugs and Features request
135
136If you find a bug in our image or want to request a specific feature file a bug here:
137
138https://bugs.launchpad.net/ubuntu-server-oci/+filebug
139
140In the title of the bug add `grafana: <reason>`.
141
142Make sure to include:
143
144* The digest of the image you are using, you can find it using this command replacing `<tag>` with the one you used to run the image:
145```sh
146$ docker images --no-trunc --quiet squeakywheel/grafana:<tag>
147```
148* Reproduction steps for the deployment
149* If it is a feature request, please provide as much detail as possible
diff --git a/examples/README.md b/examples/README.md
0new file mode 100644150new file mode 100644
index 0000000..45b2d60
--- /dev/null
+++ b/examples/README.md
@@ -0,0 +1,48 @@
1# Running the examples
2
3## docker-compose
4
5Install `docker-compose` from the Ubuntu archive:
6
7```
8$ sudo apt install -y docker-compose
9```
10
11Call `docker-compose` from the examples directory:
12
13```
14$ docker-compose up -d
15```
16
17Grafana will be running and available via port `3000` on your host. The user is `admin` and the password `admin`. The dashboard will not be fully functional because we provisioned the datasource but we did not hook up any Prometheus nor Telegraf instance to provide data.
18
19To stop it run:
20
21```
22$ docker-compose down
23```
24
25## Microk8s
26
27With microk8s running, enable the `dns` and `storage` add-ons:
28
29```
30$ microk8s enable dns storage
31```
32
33Create a configmap for the configuration files:
34
35```
36$ microk8s kubectl create configmap grafana-config \
37 --from-file=grafana-datasource=config/datasource.yml \
38 --from-file=grafana-dashboard-definition=config/dashboard.yml \
39 --from-file=grafana-dashboard=config/system-stats-dashboard.json
40```
41
42Apply the `grafana-deployment.yml`:
43
44```
45$ microk8s kubectl apply -f grafana-deployment.yml
46```
47
48Grafana will be running and available via port `30000` on your host. The user is `admin` and the password `admin`. The dashboard will not be fully functional because we provisioned the datasource but we did not hook up any Prometheus nor Telegraf instance to provide data.
diff --git a/examples/config/dashboard.yml b/examples/config/dashboard.yml
0new file mode 10064449new file mode 100644
index 0000000..0f882d3
--- /dev/null
+++ b/examples/config/dashboard.yml
@@ -0,0 +1,12 @@
1apiVersion: 1
2
3providers:
4 - name: dashboard
5 orgId: 1
6 folder: ''
7 type: file
8 disableDeletion: false
9 editable: true
10 allowUiUpdates: true
11 options:
12 path: /etc/grafana/provisioning/dashboards
diff --git a/examples/config/datasource.yml b/examples/config/datasource.yml
0new file mode 10064413new file mode 100644
index 0000000..0b62b9c
--- /dev/null
+++ b/examples/config/datasource.yml
@@ -0,0 +1,11 @@
1apiVersion: 1
2
3datasources:
4 - name: prometheus
5 type: prometheus
6 access: proxy
7 orgId: 1
8 url: http://prometheus:9090
9 basicAuth: false
10 isDefault: true
11 editable: true
diff --git a/examples/config/system-stats-dashboard.json b/examples/config/system-stats-dashboard.json
0new file mode 10064412new file mode 100644
index 0000000..c93f194
--- /dev/null
+++ b/examples/config/system-stats-dashboard.json
@@ -0,0 +1,2282 @@
1{
2 "annotations": {
3 "list": [
4 {
5 "builtIn": 1,
6 "datasource": "prometheus",
7 "enable": true,
8 "hide": true,
9 "iconColor": "rgba(0, 211, 255, 1)",
10 "name": "Annotations & Alerts",
11 "type": "dashboard"
12 }
13 ]
14 },
15 "editable": true,
16 "gnetId": null,
17 "graphTooltip": 1,
18 "id": 1,
19 "iteration": 1602280737314,
20 "links": [],
21 "panels": [
22 {
23 "collapsed": false,
24 "datasource": "prometheus",
25 "gridPos": {
26 "h": 1,
27 "w": 24,
28 "x": 0,
29 "y": 0
30 },
31 "id": 287,
32 "panels": [],
33 "repeat": null,
34 "title": "Load/CPU/Memory/Swap",
35 "type": "row"
36 },
37 {
38 "aliasColors": {},
39 "bars": false,
40 "dashLength": 10,
41 "dashes": false,
42 "datasource": "prometheus",
43 "description": "",
44 "fieldConfig": {
45 "defaults": {
46 "custom": {},
47 "links": []
48 },
49 "overrides": []
50 },
51 "fill": 1,
52 "fillGradient": 0,
53 "gridPos": {
54 "h": 9,
55 "w": 12,
56 "x": 0,
57 "y": 1
58 },
59 "height": "",
60 "hiddenSeries": false,
61 "id": 1,
62 "legend": {
63 "alignAsTable": true,
64 "avg": false,
65 "current": true,
66 "max": true,
67 "min": true,
68 "show": true,
69 "total": false,
70 "values": true
71 },
72 "lines": true,
73 "linewidth": 1,
74 "links": [],
75 "nullPointMode": "null",
76 "options": {
77 "alertThreshold": true
78 },
79 "percentage": false,
80 "pluginVersion": "7.2.0",
81 "pointradius": 5,
82 "points": false,
83 "renderer": "flot",
84 "seriesOverrides": [],
85 "spaceLength": 10,
86 "stack": false,
87 "steppedLine": false,
88 "targets": [
89 {
90 "expr": "system_load1{host=~\"$host\"}",
91 "format": "time_series",
92 "interval": "",
93 "intervalFactor": 2,
94 "legendFormat": "{{host}} 1min",
95 "refId": "A",
96 "step": 60
97 },
98 {
99 "expr": "system_load5{host=~\"$host\"}",
100 "format": "time_series",
101 "interval": "",
102 "intervalFactor": 2,
103 "legendFormat": "{{host}} 5min",
104 "refId": "B",
105 "step": 60
106 },
107 {
108 "expr": "system_load15{host=~\"$host\"}",
109 "format": "time_series",
110 "interval": "",
111 "intervalFactor": 2,
112 "legendFormat": "{{host}} 15min",
113 "refId": "C",
114 "step": 60
115 }
116 ],
117 "thresholds": [],
118 "timeFrom": null,
119 "timeRegions": [],
120 "timeShift": null,
121 "title": "Load average",
122 "tooltip": {
123 "shared": true,
124 "sort": 0,
125 "value_type": "individual"
126 },
127 "type": "graph",
128 "xaxis": {
129 "buckets": null,
130 "mode": "time",
131 "name": null,
132 "show": true,
133 "values": []
134 },
135 "yaxes": [
136 {
137 "format": "short",
138 "label": null,
139 "logBase": 1,
140 "max": null,
141 "min": null,
142 "show": true
143 },
144 {
145 "format": "short",
146 "label": null,
147 "logBase": 1,
148 "max": null,
149 "min": null,
150 "show": true
151 }
152 ],
153 "yaxis": {
154 "align": false,
155 "alignLevel": null
156 }
157 },
158 {
159 "aliasColors": {},
160 "bars": false,
161 "dashLength": 10,
162 "dashes": false,
163 "datasource": "prometheus",
164 "fieldConfig": {
165 "defaults": {
166 "custom": {},
167 "links": []
168 },
169 "overrides": []
170 },
171 "fill": 1,
172 "fillGradient": 0,
173 "gridPos": {
174 "h": 18,
175 "w": 11,
176 "x": 12,
177 "y": 1
178 },
179 "hiddenSeries": false,
180 "id": 364,
181 "legend": {
182 "avg": false,
183 "current": false,
184 "max": false,
185 "min": false,
186 "show": true,
187 "total": false,
188 "values": false
189 },
190 "lines": true,
191 "linewidth": 1,
192 "nullPointMode": "null",
193 "options": {
194 "alertThreshold": true
195 },
196 "percentage": false,
197 "pluginVersion": "7.2.0",
198 "pointradius": 2,
199 "points": false,
200 "renderer": "flot",
201 "seriesOverrides": [],
202 "spaceLength": 10,
203 "stack": false,
204 "steppedLine": false,
205 "targets": [
206 {
207 "expr": "mem_dirty{host=~\"$host\"}",
208 "instant": false,
209 "interval": "",
210 "legendFormat": "",
211 "refId": "A"
212 },
213 {
214 "expr": "mem_shared{host=~\"$host\"}",
215 "interval": "",
216 "legendFormat": "",
217 "refId": "B"
218 },
219 {
220 "expr": "mem_active{host=~\"$host\"}",
221 "interval": "",
222 "legendFormat": "",
223 "refId": "C"
224 },
225 {
226 "expr": "mem_buffered{host=~\"$host\"}",
227 "interval": "",
228 "legendFormat": "",
229 "refId": "D"
230 },
231 {
232 "expr": "mem_available{host=~\"$host\"}",
233 "interval": "",
234 "legendFormat": "",
235 "refId": "E"
236 },
237 {
238 "expr": "mem_cached{host=~\"$host\"}",
239 "interval": "",
240 "legendFormat": "",
241 "refId": "F"
242 },
243 {
244 "expr": "mem_vmalloc_used{host=~\"$host\"}",
245 "interval": "",
246 "legendFormat": "",
247 "refId": "H"
248 },
249 {
250 "expr": "mem_total{host=~\"$host\"}",
251 "interval": "",
252 "legendFormat": "",
253 "refId": "I"
254 }
255 ],
256 "thresholds": [],
257 "timeFrom": null,
258 "timeRegions": [],
259 "timeShift": null,
260 "title": "Mem stats",
261 "tooltip": {
262 "shared": true,
263 "sort": 0,
264 "value_type": "individual"
265 },
266 "type": "graph",
267 "xaxis": {
268 "buckets": null,
269 "mode": "time",
270 "name": null,
271 "show": true,
272 "values": []
273 },
274 "yaxes": [
275 {
276 "format": "bytes",
277 "label": null,
278 "logBase": 1,
279 "max": null,
280 "min": null,
281 "show": true
282 },
283 {
284 "format": "short",
285 "label": null,
286 "logBase": 1,
287 "max": null,
288 "min": null,
289 "show": true
290 }
291 ],
292 "yaxis": {
293 "align": false,
294 "alignLevel": null
295 }
296 },
297 {
298 "aliasColors": {},
299 "bars": false,
300 "dashLength": 10,
301 "dashes": false,
302 "datasource": "prometheus",
303 "description": "",
304 "fieldConfig": {
305 "defaults": {
306 "custom": {},
307 "links": []
308 },
309 "overrides": []
310 },
311 "fill": 6,
312 "fillGradient": 0,
313 "gridPos": {
314 "h": 9,
315 "w": 12,
316 "x": 0,
317 "y": 10
318 },
319 "height": "",
320 "hiddenSeries": false,
321 "id": 4,
322 "legend": {
323 "alignAsTable": true,
324 "avg": false,
325 "current": true,
326 "max": true,
327 "min": true,
328 "show": true,
329 "total": false,
330 "values": true
331 },
332 "lines": true,
333 "linewidth": 1,
334 "links": [],
335 "nullPointMode": "null",
336 "options": {
337 "alertThreshold": true
338 },
339 "percentage": false,
340 "pluginVersion": "7.2.0",
341 "pointradius": 5,
342 "points": false,
343 "renderer": "flot",
344 "seriesOverrides": [],
345 "spaceLength": 10,
346 "stack": false,
347 "steppedLine": false,
348 "targets": [
349 {
350 "expr": "mem_used{host=~\"$host\"}",
351 "format": "time_series",
352 "interval": "",
353 "intervalFactor": 2,
354 "legendFormat": "{{host}} Used",
355 "refId": "A",
356 "step": 60
357 },
358 {
359 "expr": "mem_buffered{host=~\"$host\"} + mem_cached{host=~\"$host\"}",
360 "format": "time_series",
361 "interval": "",
362 "intervalFactor": 2,
363 "legendFormat": "{{host}} Buffers+cache",
364 "refId": "B",
365 "step": 60
366 },
367 {
368 "expr": "mem_free{host=~\"$host\"}",
369 "format": "time_series",
370 "interval": "",
371 "intervalFactor": 2,
372 "legendFormat": "{{host}} Free",
373 "refId": "C",
374 "step": 60
375 }
376 ],
377 "thresholds": [],
378 "timeFrom": null,
379 "timeRegions": [],
380 "timeShift": null,
381 "title": "Memory",
382 "tooltip": {
383 "shared": true,
384 "sort": 0,
385 "value_type": "individual"
386 },
387 "type": "graph",
388 "xaxis": {
389 "buckets": null,
390 "mode": "time",
391 "name": null,
392 "show": true,
393 "values": []
394 },
395 "yaxes": [
396 {
397 "format": "bytes",
398 "label": null,
399 "logBase": 1,
400 "max": null,
401 "min": "0",
402 "show": true
403 },
404 {
405 "format": "short",
406 "label": null,
407 "logBase": 1,
408 "max": null,
409 "min": null,
410 "show": true
411 }
412 ],
413 "yaxis": {
414 "align": false,
415 "alignLevel": null
416 }
417 },
418 {
419 "aliasColors": {},
420 "bars": false,
421 "dashLength": 10,
422 "dashes": false,
423 "datasource": "prometheus",
424 "editable": true,
425 "error": false,
426 "fieldConfig": {
427 "defaults": {
428 "custom": {},
429 "links": []
430 },
431 "overrides": []
432 },
433 "fill": 4,
434 "fillGradient": 0,
435 "grid": {},
436 "gridPos": {
437 "h": 15,
438 "w": 24,
439 "x": 0,
440 "y": 19
441 },
442 "height": "310px",
443 "hiddenSeries": false,
444 "id": 5,
445 "legend": {
446 "alignAsTable": false,
447 "avg": false,
448 "current": true,
449 "max": false,
450 "min": false,
451 "show": true,
452 "sortDesc": true,
453 "total": false,
454 "values": true
455 },
456 "lines": true,
457 "linewidth": 2,
458 "links": [],
459 "nullPointMode": "null",
460 "options": {
461 "alertThreshold": true
462 },
463 "percentage": false,
464 "pluginVersion": "7.2.0",
465 "pointradius": 5,
466 "points": false,
467 "renderer": "flot",
468 "seriesOverrides": [],
469 "spaceLength": 10,
470 "stack": true,
471 "steppedLine": false,
472 "targets": [
473 {
474 "expr": "cpu_usage_user{cpu=\"cpu-total\",host=~\"$host\"}",
475 "format": "time_series",
476 "interval": "",
477 "intervalFactor": 2,
478 "legendFormat": "{{host}} user",
479 "refId": "A",
480 "step": 30
481 },
482 {
483 "expr": "cpu_usage_system{cpu=\"cpu-total\", host=~\"$host\"}",
484 "format": "time_series",
485 "interval": "",
486 "intervalFactor": 2,
487 "legendFormat": "{{host}} system",
488 "refId": "G",
489 "step": 30
490 },
491 {
492 "expr": "cpu_usage_iowait{cpu=\"cpu-total\",host=~\"$host\"}",
493 "format": "time_series",
494 "interval": "",
495 "intervalFactor": 2,
496 "legendFormat": "{{host}} iowait",
497 "refId": "C",
498 "step": 30
499 },
500 {
501 "expr": "cpu_usage_nice{cpu=\"cpu-total\",host=~\"$host\"}",
502 "format": "time_series",
503 "interval": "",
504 "intervalFactor": 2,
505 "legendFormat": "{{host}} nice",
506 "refId": "D",
507 "step": 30
508 },
509 {
510 "expr": "cpu_usage_softirq{cpu=\"cpu-total\",host=~\"$host\"}",
511 "format": "time_series",
512 "interval": "",
513 "intervalFactor": 2,
514 "legendFormat": "{{host}} softirq",
515 "refId": "E",
516 "step": 30
517 },
518 {
519 "expr": "cpu_usage_irq{cpu=\"cpu-total\",host=~\"$host\"}",
520 "format": "time_series",
521 "interval": "",
522 "intervalFactor": 2,
523 "legendFormat": "{{host}} irq",
524 "refId": "F",
525 "step": 30
526 },
527 {
528 "expr": "cpu_usage_guest{cpu=\"cpu-total\", host=~\"$host\"}",
529 "format": "time_series",
530 "interval": "",
531 "intervalFactor": 2,
532 "legendFormat": "{{host}} guest",
533 "refId": "H",
534 "step": 30
535 },
536 {
537 "expr": "cpu_usage_guest_nice{cpu=\"cpu-total\", host=~\"$host\"}",
538 "format": "time_series",
539 "interval": "",
540 "intervalFactor": 2,
541 "legendFormat": "{{host}} guest_nice",
542 "refId": "I",
543 "step": 30
544 },
545 {
546 "expr": "cpu_usage_idle{cpu=\"cpu-total\", host=~\"$host\"}",
547 "format": "time_series",
548 "interval": "",
549 "intervalFactor": 2,
550 "legendFormat": "{{host}} idle",
551 "refId": "B",
552 "step": 30
553 }
554 ],
555 "thresholds": [],
556 "timeFrom": null,
557 "timeRegions": [],
558 "timeShift": null,
559 "title": "CPU",
560 "tooltip": {
561 "msResolution": false,
562 "shared": true,
563 "sort": 0,
564 "value_type": "individual"
565 },
566 "type": "graph",
567 "xaxis": {
568 "buckets": null,
569 "mode": "time",
570 "name": null,
571 "show": true,
572 "values": []
573 },
574 "yaxes": [
575 {
576 "format": "percent",
577 "label": "",
578 "logBase": 1,
579 "max": null,
580 "min": 0,
581 "show": true
582 },
583 {
584 "format": "short",
585 "label": null,
586 "logBase": 1,
587 "max": null,
588 "min": null,
589 "show": true
590 }
591 ],
592 "yaxis": {
593 "align": false,
594 "alignLevel": null
595 }
596 },
597 {
598 "aliasColors": {},
599 "bars": false,
600 "dashLength": 10,
601 "dashes": false,
602 "datasource": "prometheus",
603 "editable": true,
604 "error": false,
605 "fieldConfig": {
606 "defaults": {
607 "custom": {},
608 "links": []
609 },
610 "overrides": []
611 },
612 "fill": 4,
613 "fillGradient": 0,
614 "grid": {},
615 "gridPos": {
616 "h": 9,
617 "w": 12,
618 "x": 0,
619 "y": 34
620 },
621 "height": "310px",
622 "hiddenSeries": false,
623 "id": 338,
624 "legend": {
625 "alignAsTable": false,
626 "avg": false,
627 "current": true,
628 "max": false,
629 "min": false,
630 "show": true,
631 "sortDesc": true,
632 "total": false,
633 "values": true
634 },
635 "lines": true,
636 "linewidth": 2,
637 "links": [],
638 "nullPointMode": "null",
639 "options": {
640 "alertThreshold": true
641 },
642 "percentage": false,
643 "pluginVersion": "7.2.0",
644 "pointradius": 5,
645 "points": false,
646 "renderer": "flot",
647 "seriesOverrides": [],
648 "spaceLength": 10,
649 "stack": true,
650 "steppedLine": false,
651 "targets": [
652 {
653 "expr": "cpu_usage_steal{cpu=\"cpu-total\",host=~\"$host\"}",
654 "format": "time_series",
655 "interval": "",
656 "intervalFactor": 2,
657 "legendFormat": "{{host}} steal",
658 "refId": "A",
659 "step": 30
660 }
661 ],
662 "thresholds": [],
663 "timeFrom": null,
664 "timeRegions": [],
665 "timeShift": null,
666 "title": "CPU steal",
667 "tooltip": {
668 "msResolution": false,
669 "shared": true,
670 "sort": 0,
671 "value_type": "individual"
672 },
673 "type": "graph",
674 "xaxis": {
675 "buckets": null,
676 "mode": "time",
677 "name": null,
678 "show": true,
679 "values": []
680 },
681 "yaxes": [
682 {
683 "format": "percent",
684 "label": "",
685 "logBase": 1,
686 "max": null,
687 "min": 0,
688 "show": true
689 },
690 {
691 "format": "short",
692 "label": null,
693 "logBase": 1,
694 "max": null,
695 "min": null,
696 "show": true
697 }
698 ],
699 "yaxis": {
700 "align": false,
701 "alignLevel": null
702 }
703 },
704 {
705 "aliasColors": {},
706 "bars": false,
707 "dashLength": 10,
708 "dashes": false,
709 "datasource": "prometheus",
710 "description": "",
711 "fieldConfig": {
712 "defaults": {
713 "custom": {},
714 "links": []
715 },
716 "overrides": []
717 },
718 "fill": 1,
719 "fillGradient": 0,
720 "gridPos": {
721 "h": 9,
722 "w": 12,
723 "x": 12,
724 "y": 34
725 },
726 "hiddenSeries": false,
727 "id": 41,
728 "legend": {
729 "alignAsTable": false,
730 "avg": false,
731 "current": false,
732 "max": false,
733 "min": false,
734 "show": true,
735 "total": false,
736 "values": false
737 },
738 "lines": true,
739 "linewidth": 1,
740 "links": [],
741 "nullPointMode": "null",
742 "options": {
743 "alertThreshold": true
744 },
745 "percentage": false,
746 "pluginVersion": "7.2.0",
747 "pointradius": 5,
748 "points": false,
749 "renderer": "flot",
750 "seriesOverrides": [],
751 "spaceLength": 10,
752 "stack": false,
753 "steppedLine": false,
754 "targets": [
755 {
756 "expr": "swap_used_percent{host=~\"$host\"}",
757 "format": "time_series",
758 "interval": "",
759 "intervalFactor": 2,
760 "legendFormat": "{{host}}",
761 "refId": "A",
762 "step": 60
763 }
764 ],
765 "thresholds": [],
766 "timeFrom": null,
767 "timeRegions": [],
768 "timeShift": null,
769 "title": "Swap used %",
770 "tooltip": {
771 "shared": true,
772 "sort": 0,
773 "value_type": "individual"
774 },
775 "type": "graph",
776 "xaxis": {
777 "buckets": null,
778 "mode": "time",
779 "name": null,
780 "show": true,
781 "values": []
782 },
783 "yaxes": [
784 {
785 "decimals": null,
786 "format": "percent",
787 "label": null,
788 "logBase": 1,
789 "max": "100",
790 "min": "0",
791 "show": true
792 },
793 {
794 "format": "short",
795 "label": null,
796 "logBase": 1,
797 "max": null,
798 "min": null,
799 "show": true
800 }
801 ],
802 "yaxis": {
803 "align": false,
804 "alignLevel": null
805 }
806 },
807 {
808 "aliasColors": {},
809 "bars": false,
810 "dashLength": 10,
811 "dashes": false,
812 "datasource": "prometheus",
813 "description": "",
814 "fieldConfig": {
815 "defaults": {
816 "custom": {},
817 "links": []
818 },
819 "overrides": []
820 },
821 "fill": 1,
822 "fillGradient": 0,
823 "gridPos": {
824 "h": 9,
825 "w": 12,
826 "x": 0,
827 "y": 43
828 },
829 "hiddenSeries": false,
830 "id": 15,
831 "legend": {
832 "alignAsTable": false,
833 "avg": false,
834 "current": false,
835 "max": false,
836 "min": false,
837 "show": true,
838 "total": false,
839 "values": false
840 },
841 "lines": true,
842 "linewidth": 1,
843 "links": [],
844 "nullPointMode": "null",
845 "options": {
846 "alertThreshold": true
847 },
848 "percentage": false,
849 "pluginVersion": "7.2.0",
850 "pointradius": 5,
851 "points": false,
852 "renderer": "flot",
853 "seriesOverrides": [],
854 "spaceLength": 10,
855 "stack": false,
856 "steppedLine": false,
857 "targets": [
858 {
859 "expr": "rate(swap_in{host=~\"$host\"}[2m])",
860 "format": "time_series",
861 "interval": "",
862 "intervalFactor": 2,
863 "legendFormat": "{{host}} In",
864 "refId": "A",
865 "step": 60
866 },
867 {
868 "expr": "rate(swap_out{host=~\"$host\"}[2m])",
869 "format": "time_series",
870 "interval": "",
871 "intervalFactor": 2,
872 "legendFormat": "{{host}} Out",
873 "refId": "B",
874 "step": 60
875 }
876 ],
877 "thresholds": [],
878 "timeFrom": null,
879 "timeRegions": [],
880 "timeShift": null,
881 "title": "Swap in/out throuput",
882 "tooltip": {
883 "shared": true,
884 "sort": 0,
885 "value_type": "individual"
886 },
887 "type": "graph",
888 "xaxis": {
889 "buckets": null,
890 "mode": "time",
891 "name": null,
892 "show": true,
893 "values": []
894 },
895 "yaxes": [
896 {
897 "format": "Bps",
898 "label": null,
899 "logBase": 1,
900 "max": null,
901 "min": "0",
902 "show": true
903 },
904 {
905 "format": "short",
906 "label": null,
907 "logBase": 1,
908 "max": null,
909 "min": null,
910 "show": true
911 }
912 ],
913 "yaxis": {
914 "align": false,
915 "alignLevel": null
916 }
917 },
918 {
919 "collapsed": false,
920 "datasource": "prometheus",
921 "gridPos": {
922 "h": 1,
923 "w": 24,
924 "x": 0,
925 "y": 52
926 },
927 "id": 288,
928 "panels": [],
929 "repeat": null,
930 "title": "Network",
931 "type": "row"
932 },
933 {
934 "collapsed": false,
935 "datasource": "prometheus",
936 "gridPos": {
937 "h": 1,
938 "w": 24,
939 "x": 0,
940 "y": 53
941 },
942 "id": 289,
943 "panels": [],
944 "repeat": null,
945 "title": "Disk performance",
946 "type": "row"
947 },
948 {
949 "aliasColors": {},
950 "bars": false,
951 "dashLength": 10,
952 "dashes": false,
953 "datasource": "prometheus",
954 "editable": true,
955 "error": false,
956 "fieldConfig": {
957 "defaults": {
958 "custom": {},
959 "links": []
960 },
961 "overrides": []
962 },
963 "fill": 0,
964 "fillGradient": 0,
965 "grid": {},
966 "gridPos": {
967 "h": 9,
968 "w": 12,
969 "x": 0,
970 "y": 54
971 },
972 "hiddenSeries": false,
973 "id": 9,
974 "legend": {
975 "alignAsTable": true,
976 "avg": false,
977 "current": true,
978 "max": true,
979 "min": true,
980 "show": true,
981 "total": false,
982 "values": true
983 },
984 "lines": true,
985 "linewidth": 2,
986 "links": [],
987 "nullPointMode": "null",
988 "options": {
989 "alertThreshold": true
990 },
991 "percentage": false,
992 "pluginVersion": "7.2.0",
993 "pointradius": 5,
994 "points": false,
995 "renderer": "flot",
996 "seriesOverrides": [],
997 "spaceLength": 10,
998 "stack": false,
999 "steppedLine": false,
1000 "targets": [
1001 {
1002 "expr": "irate(diskio_reads{name=~\"nvme.*|sd.*|xv.*|vd.*|dasd.*|bcache.*\",name!~\"nvme.*p[0-9]+$|.*sd.*[0-9]$|xv.*[0-9]$|vd.*[0-9]$|dasd.*[0-9]$\",host=~\"$host\"}[2m])",
1003 "format": "time_series",
1004 "interval": "",
1005 "intervalFactor": 2,
1006 "legendFormat": "{{host}} {{name}}",
1007 "refId": "B",
1008 "step": 60
1009 }
1010 ],
1011 "thresholds": [],
1012 "timeFrom": null,
1013 "timeRegions": [],
1014 "timeShift": null,
1015 "title": "IOPS Read",
1016 "tooltip": {
1017 "msResolution": true,
1018 "shared": true,
1019 "sort": 0,
1020 "value_type": "cumulative"
1021 },
1022 "type": "graph",
1023 "xaxis": {
1024 "buckets": null,
1025 "mode": "time",
1026 "name": null,
1027 "show": true,
1028 "values": []
1029 },
1030 "yaxes": [
1031 {
1032 "format": "iops",
1033 "label": null,
1034 "logBase": 1,
1035 "max": null,
1036 "min": "0",
1037 "show": true
1038 },
1039 {
1040 "format": "short",
1041 "label": null,
1042 "logBase": 1,
1043 "max": null,
1044 "min": null,
1045 "show": true
1046 }
1047 ],
1048 "yaxis": {
1049 "align": false,
1050 "alignLevel": null
1051 }
1052 },
1053 {
1054 "aliasColors": {},
1055 "bars": false,
1056 "dashLength": 10,
1057 "dashes": false,
1058 "datasource": "prometheus",
1059 "editable": true,
1060 "error": false,
1061 "fieldConfig": {
1062 "defaults": {
1063 "custom": {},
1064 "links": []
1065 },
1066 "overrides": []
1067 },
1068 "fill": 0,
1069 "fillGradient": 0,
1070 "grid": {},
1071 "gridPos": {
1072 "h": 9,
1073 "w": 12,
1074 "x": 12,
1075 "y": 54
1076 },
1077 "hiddenSeries": false,
1078 "id": 10,
1079 "legend": {
1080 "alignAsTable": true,
1081 "avg": false,
1082 "current": true,
1083 "max": true,
1084 "min": true,
1085 "show": true,
1086 "total": false,
1087 "values": true
1088 },
1089 "lines": true,
1090 "linewidth": 2,
1091 "links": [],
1092 "nullPointMode": "null",
1093 "options": {
1094 "alertThreshold": true
1095 },
1096 "percentage": false,
1097 "pluginVersion": "7.2.0",
1098 "pointradius": 5,
1099 "points": false,
1100 "renderer": "flot",
1101 "seriesOverrides": [],
1102 "spaceLength": 10,
1103 "stack": false,
1104 "steppedLine": false,
1105 "targets": [
1106 {
1107 "expr": "irate(diskio_writes{name=~\"nvme.*|sd.*|xv.*|vd.*|dasd.*|bcache.*\",name!~\"nvme.*p[0-9]+$|.*sd.*[0-9]$|xv.*[0-9]$|vd.*[0-9]$|dasd.*[0-9]$\",host=~\"$host\"}[2m])",
1108 "format": "time_series",
1109 "interval": "",
1110 "intervalFactor": 2,
1111 "legendFormat": "{{host}} {{name}}",
1112 "refId": "B",
1113 "step": 60
1114 }
1115 ],
1116 "thresholds": [],
1117 "timeFrom": null,
1118 "timeRegions": [],
1119 "timeShift": null,
1120 "title": "IOPS Write",
1121 "tooltip": {
1122 "msResolution": true,
1123 "shared": true,
1124 "sort": 0,
1125 "value_type": "cumulative"
1126 },
1127 "type": "graph",
1128 "xaxis": {
1129 "buckets": null,
1130 "mode": "time",
1131 "name": null,
1132 "show": true,
1133 "values": []
1134 },
1135 "yaxes": [
1136 {
1137 "format": "iops",
1138 "label": null,
1139 "logBase": 1,
1140 "max": null,
1141 "min": "0",
1142 "show": true
1143 },
1144 {
1145 "format": "short",
1146 "label": null,
1147 "logBase": 1,
1148 "max": null,
1149 "min": null,
1150 "show": true
1151 }
1152 ],
1153 "yaxis": {
1154 "align": false,
1155 "alignLevel": null
1156 }
1157 },
1158 {
1159 "aliasColors": {},
1160 "bars": false,
1161 "dashLength": 10,
1162 "dashes": false,
1163 "datasource": "prometheus",
1164 "editable": true,
1165 "error": false,
1166 "fieldConfig": {
1167 "defaults": {
1168 "custom": {},
1169 "links": []
1170 },
1171 "overrides": []
1172 },
1173 "fill": 0,
1174 "fillGradient": 0,
1175 "grid": {},
1176 "gridPos": {
1177 "h": 9,
1178 "w": 12,
1179 "x": 0,
1180 "y": 63
1181 },
1182 "hiddenSeries": false,
1183 "id": 11,
1184 "legend": {
1185 "alignAsTable": true,
1186 "avg": false,
1187 "current": true,
1188 "max": true,
1189 "min": true,
1190 "show": true,
1191 "total": false,
1192 "values": true
1193 },
1194 "lines": true,
1195 "linewidth": 2,
1196 "links": [],
1197 "nullPointMode": "null",
1198 "options": {
1199 "alertThreshold": true
1200 },
1201 "percentage": false,
1202 "pluginVersion": "7.2.0",
1203 "pointradius": 5,
1204 "points": false,
1205 "renderer": "flot",
1206 "seriesOverrides": [],
1207 "spaceLength": 10,
1208 "stack": false,
1209 "steppedLine": false,
1210 "targets": [
1211 {
1212 "expr": "irate(diskio_read_bytes{name=~\"nvme.*|sd.*|xv.*|vd.*|dasd.*|bcache.*|md0\",name!~\"nvme.*p[0-9]+$|.*sd.*[0-9]$|xv.*[0-9]$|vd.*[0-9]$|dasd.*[0-9]$\",host=~\"$host\"}[2m])",
1213 "format": "time_series",
1214 "interval": "",
1215 "intervalFactor": 2,
1216 "legendFormat": "{{host}} {{name}}",
1217 "refId": "B",
1218 "step": 60
1219 }
1220 ],
1221 "thresholds": [],
1222 "timeFrom": null,
1223 "timeRegions": [],
1224 "timeShift": null,
1225 "title": "Disk Read",
1226 "tooltip": {
1227 "msResolution": true,
1228 "shared": true,
1229 "sort": 0,
1230 "value_type": "cumulative"
1231 },
1232 "type": "graph",
1233 "xaxis": {
1234 "buckets": null,
1235 "mode": "time",
1236 "name": null,
1237 "show": true,
1238 "values": []
1239 },
1240 "yaxes": [
1241 {
1242 "format": "Bps",
1243 "label": null,
1244 "logBase": 1,
1245 "max": null,
1246 "min": "0",
1247 "show": true
1248 },
1249 {
1250 "format": "short",
1251 "label": null,
1252 "logBase": 1,
1253 "max": null,
1254 "min": null,
1255 "show": true
1256 }
1257 ],
1258 "yaxis": {
1259 "align": false,
1260 "alignLevel": null
1261 }
1262 },
1263 {
1264 "aliasColors": {},
1265 "bars": false,
1266 "dashLength": 10,
1267 "dashes": false,
1268 "datasource": "prometheus",
1269 "editable": true,
1270 "error": false,
1271 "fieldConfig": {
1272 "defaults": {
1273 "custom": {},
1274 "links": []
1275 },
1276 "overrides": []
1277 },
1278 "fill": 0,
1279 "fillGradient": 0,
1280 "grid": {},
1281 "gridPos": {
1282 "h": 9,
1283 "w": 12,
1284 "x": 12,
1285 "y": 63
1286 },
1287 "hiddenSeries": false,
1288 "id": 12,
1289 "legend": {
1290 "alignAsTable": true,
1291 "avg": false,
1292 "current": true,
1293 "max": true,
1294 "min": true,
1295 "show": true,
1296 "total": false,
1297 "values": true
1298 },
1299 "lines": true,
1300 "linewidth": 2,
1301 "links": [],
1302 "nullPointMode": "null",
1303 "options": {
1304 "alertThreshold": true
1305 },
1306 "percentage": false,
1307 "pluginVersion": "7.2.0",
1308 "pointradius": 5,
1309 "points": false,
1310 "renderer": "flot",
1311 "seriesOverrides": [],
1312 "spaceLength": 10,
1313 "stack": false,
1314 "steppedLine": false,
1315 "targets": [
1316 {
1317 "expr": "irate(diskio_write_bytes{name=~\"nvme.*|sd.*|xv.*|vd.*|dasd.*|bcache.*|md0\",name!~\"nvme.*p[0-9]+$|.*sd.*[0-9]$|xv.*[0-9]$|vd.*[0-9]$|dasd.*[0-9]$\",host=~\"$host\"}[2m])",
1318 "format": "time_series",
1319 "interval": "",
1320 "intervalFactor": 2,
1321 "legendFormat": "{{host}} {{name}}",
1322 "refId": "B",
1323 "step": 60
1324 }
1325 ],
1326 "thresholds": [],
1327 "timeFrom": null,
1328 "timeRegions": [],
1329 "timeShift": null,
1330 "title": "Disk write",
1331 "tooltip": {
1332 "msResolution": true,
1333 "shared": true,
1334 "sort": 0,
1335 "value_type": "cumulative"
1336 },
1337 "type": "graph",
1338 "xaxis": {
1339 "buckets": null,
1340 "mode": "time",
1341 "name": null,
1342 "show": true,
1343 "values": []
1344 },
1345 "yaxes": [
1346 {
1347 "format": "Bps",
1348 "label": null,
1349 "logBase": 1,
1350 "max": null,
1351 "min": "0",
1352 "show": true
1353 },
1354 {
1355 "format": "short",
1356 "label": null,
1357 "logBase": 1,
1358 "max": null,
1359 "min": null,
1360 "show": true
1361 }
1362 ],
1363 "yaxis": {
1364 "align": false,
1365 "alignLevel": null
1366 }
1367 },
1368 {
1369 "aliasColors": {},
1370 "bars": false,
1371 "dashLength": 10,
1372 "dashes": false,
1373 "datasource": "prometheus",
1374 "editable": true,
1375 "error": false,
1376 "fieldConfig": {
1377 "defaults": {
1378 "custom": {},
1379 "links": []
1380 },
1381 "overrides": []
1382 },
1383 "fill": 0,
1384 "fillGradient": 0,
1385 "grid": {},
1386 "gridPos": {
1387 "h": 9,
1388 "w": 24,
1389 "x": 0,
1390 "y": 72
1391 },
1392 "hiddenSeries": false,
1393 "id": 39,
1394 "legend": {
1395 "alignAsTable": true,
1396 "avg": false,
1397 "current": true,
1398 "max": true,
1399 "min": true,
1400 "show": true,
1401 "total": false,
1402 "values": true
1403 },
1404 "lines": true,
1405 "linewidth": 2,
1406 "links": [],
1407 "nullPointMode": "null",
1408 "options": {
1409 "alertThreshold": true
1410 },
1411 "percentage": false,
1412 "pluginVersion": "7.2.0",
1413 "pointradius": 5,
1414 "points": false,
1415 "renderer": "flot",
1416 "seriesOverrides": [],
1417 "spaceLength": 10,
1418 "stack": false,
1419 "steppedLine": false,
1420 "targets": [
1421 {
1422 "expr": "irate(diskio_io_time{name=~\"nvme.*|sd.*|xv.*|vd.*|dasd.*|bcache.*|md0\",name!~\"nvme.*p[0-9]+$|.*sd.*[0-9]$|xv.*[0-9]$|vd.*[0-9]$|dasd.*[0-9]$\",host=~\"$host\"}[2m])",
1423 "format": "time_series",
1424 "interval": "",
1425 "intervalFactor": 2,
1426 "legendFormat": "{{host}} {{name}}",
1427 "refId": "B",
1428 "step": 2
1429 }
1430 ],
1431 "thresholds": [],
1432 "timeFrom": null,
1433 "timeRegions": [],
1434 "timeShift": null,
1435 "title": "IO wait",
1436 "tooltip": {
1437 "msResolution": true,
1438 "shared": true,
1439 "sort": 0,
1440 "value_type": "individual"
1441 },
1442 "type": "graph",
1443 "xaxis": {
1444 "buckets": null,
1445 "mode": "time",
1446 "name": null,
1447 "show": true,
1448 "values": []
1449 },
1450 "yaxes": [
1451 {
1452 "format": "ms",
1453 "label": null,
1454 "logBase": 1,
1455 "max": null,
1456 "min": "0",
1457 "show": true
1458 },
1459 {
1460 "format": "short",
1461 "label": null,
1462 "logBase": 1,
1463 "max": null,
1464 "min": null,
1465 "show": true
1466 }
1467 ],
1468 "yaxis": {
1469 "align": false,
1470 "alignLevel": null
1471 }
1472 },
1473 {
1474 "collapsed": false,
1475 "datasource": "prometheus",
1476 "gridPos": {
1477 "h": 1,
1478 "w": 24,
1479 "x": 0,
1480 "y": 81
1481 },
1482 "id": 290,
1483 "panels": [],
1484 "repeat": null,
1485 "title": "Disk space",
1486 "type": "row"
1487 },
1488 {
1489 "aliasColors": {},
1490 "bars": false,
1491 "dashLength": 10,
1492 "dashes": false,
1493 "datasource": "prometheus",
1494 "editable": true,
1495 "error": false,
1496 "fieldConfig": {
1497 "defaults": {
1498 "custom": {},
1499 "links": []
1500 },
1501 "overrides": []
1502 },
1503 "fill": 6,
1504 "fillGradient": 0,
1505 "grid": {},
1506 "gridPos": {
1507 "h": 7,
1508 "w": 8,
1509 "x": 0,
1510 "y": 82
1511 },
1512 "hiddenSeries": false,
1513 "id": 16,
1514 "legend": {
1515 "alignAsTable": false,
1516 "avg": false,
1517 "current": true,
1518 "max": false,
1519 "min": false,
1520 "show": true,
1521 "total": false,
1522 "values": true
1523 },
1524 "lines": true,
1525 "linewidth": 0,
1526 "links": [],
1527 "nullPointMode": "null",
1528 "options": {
1529 "alertThreshold": true
1530 },
1531 "percentage": false,
1532 "pluginVersion": "7.2.0",
1533 "pointradius": 5,
1534 "points": false,
1535 "renderer": "flot",
1536 "repeat": "mountpoint",
1537 "seriesOverrides": [],
1538 "spaceLength": 10,
1539 "stack": true,
1540 "steppedLine": false,
1541 "targets": [
1542 {
1543 "expr": "disk_free{host=~\"$host\"}",
1544 "format": "time_series",
1545 "interval": "",
1546 "intervalFactor": 2,
1547 "legendFormat": "{{host}} \"{{path}}\" Free",
1548 "refId": "B",
1549 "step": 2
1550 },
1551 {
1552 "expr": "disk_used{host=~\"$host\"}",
1553 "format": "time_series",
1554 "interval": "",
1555 "intervalFactor": 2,
1556 "legendFormat": "{{host}} \"{{path}}\" Used",
1557 "refId": "A",
1558 "step": 2
1559 }
1560 ],
1561 "thresholds": [],
1562 "timeFrom": null,
1563 "timeRegions": [],
1564 "timeShift": null,
1565 "title": "Disk space (stacked)",
1566 "tooltip": {
1567 "msResolution": true,
1568 "shared": true,
1569 "sort": 0,
1570 "value_type": "individual"
1571 },
1572 "type": "graph",
1573 "xaxis": {
1574 "buckets": null,
1575 "mode": "time",
1576 "name": null,
1577 "show": true,
1578 "values": []
1579 },
1580 "yaxes": [
1581 {
1582 "format": "decbytes",
1583 "label": null,
1584 "logBase": 1,
1585 "max": null,
1586 "min": "0",
1587 "show": true
1588 },
1589 {
1590 "format": "short",
1591 "label": null,
1592 "logBase": 1,
1593 "max": null,
1594 "min": null,
1595 "show": true
1596 }
1597 ],
1598 "yaxis": {
1599 "align": false,
1600 "alignLevel": null
1601 }
1602 },
1603 {
1604 "aliasColors": {},
1605 "bars": false,
1606 "dashLength": 10,
1607 "dashes": false,
1608 "datasource": "prometheus",
1609 "editable": true,
1610 "error": false,
1611 "fieldConfig": {
1612 "defaults": {
1613 "custom": {},
1614 "links": []
1615 },
1616 "overrides": []
1617 },
1618 "fill": 0,
1619 "fillGradient": 0,
1620 "grid": {},
1621 "gridPos": {
1622 "h": 7,
1623 "w": 8,
1624 "x": 8,
1625 "y": 82
1626 },
1627 "hiddenSeries": false,
1628 "id": 40,
1629 "legend": {
1630 "alignAsTable": false,
1631 "avg": false,
1632 "current": true,
1633 "max": false,
1634 "min": false,
1635 "show": true,
1636 "total": false,
1637 "values": true
1638 },
1639 "lines": true,
1640 "linewidth": 2,
1641 "links": [],
1642 "nullPointMode": "null",
1643 "options": {
1644 "alertThreshold": true
1645 },
1646 "percentage": false,
1647 "pluginVersion": "7.2.0",
1648 "pointradius": 5,
1649 "points": false,
1650 "renderer": "flot",
1651 "repeat": "mountpoint",
1652 "seriesOverrides": [],
1653 "spaceLength": 10,
1654 "stack": false,
1655 "steppedLine": false,
1656 "targets": [
1657 {
1658 "expr": "disk_used{host=~\"$host\"} / disk_total{host=~\"$host\"} * 100",
1659 "format": "time_series",
1660 "interval": "",
1661 "intervalFactor": 2,
1662 "legendFormat": "{{host}} \"{{path}}\"",
1663 "refId": "B",
1664 "step": 2
1665 }
1666 ],
1667 "thresholds": [],
1668 "timeFrom": null,
1669 "timeRegions": [],
1670 "timeShift": null,
1671 "title": "Disk space % used",
1672 "tooltip": {
1673 "msResolution": true,
1674 "shared": true,
1675 "sort": 0,
1676 "value_type": "individual"
1677 },
1678 "type": "graph",
1679 "xaxis": {
1680 "buckets": null,
1681 "mode": "time",
1682 "name": null,
1683 "show": true,
1684 "values": []
1685 },
1686 "yaxes": [
1687 {
1688 "format": "percent",
1689 "label": null,
1690 "logBase": 1,
1691 "max": null,
1692 "min": "0",
1693 "show": true
1694 },
1695 {
1696 "format": "short",
1697 "label": null,
1698 "logBase": 1,
1699 "max": null,
1700 "min": null,
1701 "show": true
1702 }
1703 ],
1704 "yaxis": {
1705 "align": false,
1706 "alignLevel": null
1707 }
1708 },
1709 {
1710 "aliasColors": {},
1711 "bars": false,
1712 "dashLength": 10,
1713 "dashes": false,
1714 "datasource": "prometheus",
1715 "editable": true,
1716 "error": false,
1717 "fieldConfig": {
1718 "defaults": {
1719 "custom": {},
1720 "links": []
1721 },
1722 "overrides": []
1723 },
1724 "fill": 0,
1725 "fillGradient": 0,
1726 "grid": {},
1727 "gridPos": {
1728 "h": 7,
1729 "w": 8,
1730 "x": 16,
1731 "y": 82
1732 },
1733 "hiddenSeries": false,
1734 "id": 17,
1735 "legend": {
1736 "alignAsTable": false,
1737 "avg": false,
1738 "current": true,
1739 "max": false,
1740 "min": false,
1741 "show": true,
1742 "total": false,
1743 "values": true
1744 },
1745 "lines": true,
1746 "linewidth": 2,
1747 "links": [],
1748 "nullPointMode": "null",
1749 "options": {
1750 "alertThreshold": true
1751 },
1752 "percentage": false,
1753 "pluginVersion": "7.2.0",
1754 "pointradius": 5,
1755 "points": false,
1756 "renderer": "flot",
1757 "repeat": "mountpoint",
1758 "seriesOverrides": [],
1759 "spaceLength": 10,
1760 "stack": false,
1761 "steppedLine": false,
1762 "targets": [
1763 {
1764 "expr": "disk_inodes_used{host=~\"$host\"} / disk_inodes_total{host=~\"$host\"} * 100",
1765 "format": "time_series",
1766 "interval": "",
1767 "intervalFactor": 2,
1768 "legendFormat": "{{host}} \"{{path}}\"",
1769 "refId": "A",
1770 "step": 2
1771 }
1772 ],
1773 "thresholds": [],
1774 "timeFrom": null,
1775 "timeRegions": [],
1776 "timeShift": null,
1777 "title": "Inodes % used",
1778 "tooltip": {
1779 "msResolution": true,
1780 "shared": true,
1781 "sort": 0,
1782 "value_type": "cumulative"
1783 },
1784 "type": "graph",
1785 "xaxis": {
1786 "buckets": null,
1787 "mode": "time",
1788 "name": null,
1789 "show": true,
1790 "values": []
1791 },
1792 "yaxes": [
1793 {
1794 "format": "percent",
1795 "label": null,
1796 "logBase": 1,
1797 "max": "100",
1798 "min": "0",
1799 "show": true
1800 },
1801 {
1802 "format": "short",
1803 "label": null,
1804 "logBase": 1,
1805 "max": null,
1806 "min": null,
1807 "show": false
1808 }
1809 ],
1810 "yaxis": {
1811 "align": false,
1812 "alignLevel": null
1813 }
1814 },
1815 {
1816 "collapsed": false,
1817 "datasource": "prometheus",
1818 "gridPos": {
1819 "h": 1,
1820 "w": 24,
1821 "x": 0,
1822 "y": 89
1823 },
1824 "id": 354,
1825 "panels": [],
1826 "title": "Kernel",
1827 "type": "row"
1828 },
1829 {
1830 "aliasColors": {},
1831 "bars": false,
1832 "dashLength": 10,
1833 "dashes": false,
1834 "datasource": "prometheus",
1835 "fieldConfig": {
1836 "defaults": {
1837 "custom": {},
1838 "links": []
1839 },
1840 "overrides": []
1841 },
1842 "fill": 1,
1843 "fillGradient": 0,
1844 "gridPos": {
1845 "h": 8,
1846 "w": 12,
1847 "x": 0,
1848 "y": 90
1849 },
1850 "hiddenSeries": false,
1851 "id": 362,
1852 "legend": {
1853 "avg": false,
1854 "current": false,
1855 "max": false,
1856 "min": false,
1857 "show": true,
1858 "total": false,
1859 "values": false
1860 },
1861 "lines": true,
1862 "linewidth": 1,
1863 "nullPointMode": "null",
1864 "options": {
1865 "alertThreshold": true
1866 },
1867 "percentage": false,
1868 "pluginVersion": "7.2.0",
1869 "pointradius": 2,
1870 "points": false,
1871 "renderer": "flot",
1872 "seriesOverrides": [],
1873 "spaceLength": 10,
1874 "stack": false,
1875 "steppedLine": false,
1876 "targets": [
1877 {
1878 "expr": "rate(kernel_interrupts{host=~\"$host\"}[1m])",
1879 "interval": "",
1880 "legendFormat": "",
1881 "refId": "A"
1882 }
1883 ],
1884 "thresholds": [],
1885 "timeFrom": null,
1886 "timeRegions": [],
1887 "timeShift": null,
1888 "title": "Interrupts",
1889 "tooltip": {
1890 "shared": true,
1891 "sort": 0,
1892 "value_type": "individual"
1893 },
1894 "type": "graph",
1895 "xaxis": {
1896 "buckets": null,
1897 "mode": "time",
1898 "name": null,
1899 "show": true,
1900 "values": []
1901 },
1902 "yaxes": [
1903 {
1904 "format": "short",
1905 "label": null,
1906 "logBase": 1,
1907 "max": null,
1908 "min": null,
1909 "show": true
1910 },
1911 {
1912 "format": "short",
1913 "label": null,
1914 "logBase": 1,
1915 "max": null,
1916 "min": null,
1917 "show": true
1918 }
1919 ],
1920 "yaxis": {
1921 "align": false,
1922 "alignLevel": null
1923 }
1924 },
1925 {
1926 "aliasColors": {},
1927 "bars": false,
1928 "dashLength": 10,
1929 "dashes": false,
1930 "datasource": "prometheus",
1931 "fieldConfig": {
1932 "defaults": {
1933 "custom": {},
1934 "links": []
1935 },
1936 "overrides": []
1937 },
1938 "fill": 1,
1939 "fillGradient": 0,
1940 "gridPos": {
1941 "h": 8,
1942 "w": 12,
1943 "x": 12,
1944 "y": 90
1945 },
1946 "hiddenSeries": false,
1947 "id": 360,
1948 "legend": {
1949 "avg": false,
1950 "current": false,
1951 "max": false,
1952 "min": false,
1953 "show": true,
1954 "total": false,
1955 "values": false
1956 },
1957 "lines": true,
1958 "linewidth": 1,
1959 "nullPointMode": "null",
1960 "options": {
1961 "alertThreshold": true
1962 },
1963 "percentage": false,
1964 "pluginVersion": "7.2.0",
1965 "pointradius": 2,
1966 "points": false,
1967 "renderer": "flot",
1968 "seriesOverrides": [],
1969 "spaceLength": 10,
1970 "stack": false,
1971 "steppedLine": false,
1972 "targets": [
1973 {
1974 "expr": "rate(kernel_processes_forked{host=~\"$host\"}[1m])",
1975 "interval": "",
1976 "legendFormat": "",
1977 "refId": "A"
1978 }
1979 ],
1980 "thresholds": [],
1981 "timeFrom": null,
1982 "timeRegions": [],
1983 "timeShift": null,
1984 "title": "Forks",
1985 "tooltip": {
1986 "shared": true,
1987 "sort": 0,
1988 "value_type": "individual"
1989 },
1990 "type": "graph",
1991 "xaxis": {
1992 "buckets": null,
1993 "mode": "time",
1994 "name": null,
1995 "show": true,
1996 "values": []
1997 },
1998 "yaxes": [
1999 {
2000 "format": "short",
2001 "label": null,
2002 "logBase": 1,
2003 "max": null,
2004 "min": null,
2005 "show": true
2006 },
2007 {
2008 "format": "short",
2009 "label": null,
2010 "logBase": 1,
2011 "max": null,
2012 "min": null,
2013 "show": true
2014 }
2015 ],
2016 "yaxis": {
2017 "align": false,
2018 "alignLevel": null
2019 }
2020 },
2021 {
2022 "aliasColors": {},
2023 "bars": false,
2024 "dashLength": 10,
2025 "dashes": false,
2026 "datasource": "prometheus",
2027 "fieldConfig": {
2028 "defaults": {
2029 "custom": {},
2030 "links": []
2031 },
2032 "overrides": []
2033 },
2034 "fill": 1,
2035 "fillGradient": 0,
2036 "gridPos": {
2037 "h": 8,
2038 "w": 12,
2039 "x": 0,
2040 "y": 98
2041 },
2042 "hiddenSeries": false,
2043 "id": 358,
2044 "legend": {
2045 "avg": false,
2046 "current": false,
2047 "max": false,
2048 "min": false,
2049 "show": true,
2050 "total": false,
2051 "values": false
2052 },
2053 "lines": true,
2054 "linewidth": 1,
2055 "nullPointMode": "null",
2056 "options": {
2057 "alertThreshold": true
2058 },
2059 "percentage": false,
2060 "pluginVersion": "7.2.0",
2061 "pointradius": 2,
2062 "points": false,
2063 "renderer": "flot",
2064 "seriesOverrides": [],
2065 "spaceLength": 10,
2066 "stack": false,
2067 "steppedLine": false,
2068 "targets": [
2069 {
2070 "expr": "kernel_entropy_avail{host=~\"$host\"}",
2071 "interval": "",
2072 "legendFormat": "",
2073 "refId": "A"
2074 }
2075 ],
2076 "thresholds": [],
2077 "timeFrom": null,
2078 "timeRegions": [],
2079 "timeShift": null,
2080 "title": "Available entropy",
2081 "tooltip": {
2082 "shared": true,
2083 "sort": 0,
2084 "value_type": "individual"
2085 },
2086 "type": "graph",
2087 "xaxis": {
2088 "buckets": null,
2089 "mode": "time",
2090 "name": null,
2091 "show": true,
2092 "values": []
2093 },
2094 "yaxes": [
2095 {
2096 "format": "short",
2097 "label": null,
2098 "logBase": 1,
2099 "max": null,
2100 "min": null,
2101 "show": true
2102 },
2103 {
2104 "format": "short",
2105 "label": null,
2106 "logBase": 1,
2107 "max": null,
2108 "min": null,
2109 "show": true
2110 }
2111 ],
2112 "yaxis": {
2113 "align": false,
2114 "alignLevel": null
2115 }
2116 },
2117 {
2118 "aliasColors": {},
2119 "bars": false,
2120 "dashLength": 10,
2121 "dashes": false,
2122 "datasource": "prometheus",
2123 "fieldConfig": {
2124 "defaults": {
2125 "custom": {},
2126 "links": []
2127 },
2128 "overrides": []
2129 },
2130 "fill": 1,
2131 "fillGradient": 0,
2132 "gridPos": {
2133 "h": 8,
2134 "w": 12,
2135 "x": 12,
2136 "y": 98
2137 },
2138 "hiddenSeries": false,
2139 "id": 356,
2140 "legend": {
2141 "avg": false,
2142 "current": false,
2143 "max": false,
2144 "min": false,
2145 "show": true,
2146 "total": false,
2147 "values": false
2148 },
2149 "lines": true,
2150 "linewidth": 1,
2151 "nullPointMode": "null",
2152 "options": {
2153 "alertThreshold": true
2154 },
2155 "percentage": false,
2156 "pluginVersion": "7.2.0",
2157 "pointradius": 2,
2158 "points": false,
2159 "renderer": "flot",
2160 "seriesOverrides": [],
2161 "spaceLength": 10,
2162 "stack": false,
2163 "steppedLine": false,
2164 "targets": [
2165 {
2166 "expr": "rate(kernel_context_switches{host=~\"$host\"}[1m])",
2167 "interval": "",
2168 "legendFormat": "",
2169 "refId": "A"
2170 }
2171 ],
2172 "thresholds": [],
2173 "timeFrom": null,
2174 "timeRegions": [],
2175 "timeShift": null,
2176 "title": "Kernel context switches",
2177 "tooltip": {
2178 "shared": true,
2179 "sort": 0,
2180 "value_type": "individual"
2181 },
2182 "type": "graph",
2183 "xaxis": {
2184 "buckets": null,
2185 "mode": "time",
2186 "name": null,
2187 "show": true,
2188 "values": []
2189 },
2190 "yaxes": [
2191 {
2192 "format": "short",
2193 "label": null,
2194 "logBase": 1,
2195 "max": null,
2196 "min": null,
2197 "show": true
2198 },
2199 {
2200 "format": "short",
2201 "label": null,
2202 "logBase": 1,
2203 "max": null,
2204 "min": null,
2205 "show": true
2206 }
2207 ],
2208 "yaxis": {
2209 "align": false,
2210 "alignLevel": null
2211 }
2212 }
2213 ],
2214 "refresh": false,
2215 "schemaVersion": 26,
2216 "style": "dark",
2217 "tags": [
2218 "telegraf"
2219 ],
2220 "templating": {
2221 "list": [
2222 {
2223 "allValue": ".*",
2224 "current": {
2225 "selected": false,
2226 "text": "All",
2227 "value": "$__all"
2228 },
2229 "datasource": "prometheus",
2230 "definition": "",
2231 "hide": 0,
2232 "includeAll": true,
2233 "label": "host",
2234 "multi": true,
2235 "name": "host",
2236 "options": [],
2237 "query": "",
2238 "refresh": 1,
2239 "regex": ".*host=\"([^\"]+)\".*$",
2240 "skipUrlSync": false,
2241 "sort": 1,
2242 "tagValuesQuery": "",
2243 "tags": [],
2244 "tagsQuery": "",
2245 "type": "query",
2246 "useTags": false
2247 }
2248 ]
2249 },
2250 "time": {
2251 "from": "now-24h",
2252 "to": "now"
2253 },
2254 "timepicker": {
2255 "refresh_intervals": [
2256 "15s",
2257 "30s",
2258 "1m",
2259 "5m",
2260 "15m",
2261 "30m",
2262 "1h",
2263 "2h",
2264 "1d"
2265 ],
2266 "time_options": [
2267 "5m",
2268 "15m",
2269 "1h",
2270 "6h",
2271 "12h",
2272 "24h",
2273 "2d",
2274 "7d",
2275 "30d"
2276 ]
2277 },
2278 "timezone": "utc",
2279 "title": "System stats per host",
2280 "uid": "000000044",
2281 "version": 1
2282}
diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml
0new file mode 1006442283new file mode 100644
index 0000000..206ed81
--- /dev/null
+++ b/examples/docker-compose.yml
@@ -0,0 +1,11 @@
1version: '2'
2
3services:
4 grafana:
5 image: squeakywheel/grafana:edge
6 ports:
7 - 3000:3000
8 volumes:
9 - ./config/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
10 - ./config/dashboard.yml:/etc/grafana/provisioning/dashboards/dashboard.yml
11 - ./config/system-stats-dashboard.json:/etc/grafana/provisioning/dashboards/system-stats-dashboard.json
diff --git a/examples/grafana-deployment.yml b/examples/grafana-deployment.yml
0new file mode 10064412new file mode 100644
index 0000000..58f7097
--- /dev/null
+++ b/examples/grafana-deployment.yml
@@ -0,0 +1,58 @@
1---
2apiVersion: apps/v1
3kind: Deployment
4metadata:
5 name: grafana-deployment
6spec:
7 replicas: 1
8 selector:
9 matchLabels:
10 app: grafana
11 template:
12 metadata:
13 labels:
14 app: grafana
15 spec:
16 containers:
17 - name: grafana
18 image: squeakywheel/grafana:edge
19 volumeMounts:
20 - name: grafana-config-volume
21 mountPath: /etc/grafana/provisioning/datasources/datasource.yml
22 subPath: datasource.yml
23 - name: grafana-config-volume
24 mountPath: /etc/grafana/provisioning/dashboards/dashboard.yml
25 subPath: dashboard.yml
26 - name: grafana-config-volume
27 mountPath: /etc/grafana/provisioning/dashboards/system-stats-dashboard.json
28 subPath: system-stats-dashboard.json
29 ports:
30 - containerPort: 3000
31 name: grafana
32 protocol: TCP
33 volumes:
34 - name: grafana-config-volume
35 configMap:
36 name: grafana-config
37 items:
38 - key: grafana-datasource
39 path: datasource.yml
40 - key: grafana-dashboard-definition
41 path: dashboard.yml
42 - key: grafana-dashboard
43 path: system-stats-dashboard.json
44---
45apiVersion: v1
46kind: Service
47metadata:
48 name: grafana-service
49spec:
50 type: NodePort
51 selector:
52 app: grafana
53 ports:
54 - protocol: TCP
55 port: 3000
56 targetPort: 3000
57 nodePort: 30000
58 name: grafana

Subscribers

People subscribed via source and target branches

to all changes: