21700: Install Bundler system-wide in Rails postinst
[arvados.git] / tools / salt-install / config_examples / multi_host / aws / dashboards / postgresql_exporter.json
1 {
2   "__inputs": [
3     {
4       "name": "DS_PROMETHEUS",
5       "label": "Prometheus",
6       "description": "",
7       "type": "datasource",
8       "pluginId": "prometheus",
9       "pluginName": "Prometheus"
10     }
11   ],
12   "__elements": [],
13   "__requires": [
14     {
15       "type": "panel",
16       "id": "gauge",
17       "name": "Gauge",
18       "version": ""
19     },
20     {
21       "type": "grafana",
22       "id": "grafana",
23       "name": "Grafana",
24       "version": "8.4.5"
25     },
26     {
27       "type": "panel",
28       "id": "graph",
29       "name": "Graph (old)",
30       "version": ""
31     },
32     {
33       "type": "datasource",
34       "id": "prometheus",
35       "name": "Prometheus",
36       "version": "1.0.0"
37     },
38     {
39       "type": "panel",
40       "id": "stat",
41       "name": "Stat",
42       "version": ""
43     }
44   ],
45   "annotations": {
46     "list": [
47       {
48         "builtIn": 1,
49         "datasource": "-- Grafana --",
50         "enable": true,
51         "hide": true,
52         "iconColor": "rgba(0, 211, 255, 1)",
53         "name": "Annotations & Alerts",
54         "target": {
55           "limit": 100,
56           "matchAny": false,
57           "tags": [],
58           "type": "dashboard"
59         },
60         "type": "dashboard"
61       }
62     ]
63   },
64   "description": "Dashbord works with postgres_exporter for prometheus",
65   "editable": true,
66   "fiscalYearStartMonth": 0,
67   "gnetId": 3742,
68   "graphTooltip": 0,
69   "id": null,
70   "iteration": 1678370081292,
71   "links": [],
72   "liveNow": false,
73   "panels": [
74     {
75       "datasource": {
76         "type": "prometheus",
77         "uid": "${DS_PROMETHEUS}"
78       },
79       "fieldConfig": {
80         "defaults": {
81           "color": {
82             "mode": "thresholds"
83           },
84           "mappings": [
85             {
86               "options": {
87                 "match": "null",
88                 "result": {
89                   "text": "N/A"
90                 }
91               },
92               "type": "special"
93             }
94           ],
95           "max": 200,
96           "min": 0,
97           "thresholds": {
98             "mode": "absolute",
99             "steps": [
100               {
101                 "color": "rgba(50, 172, 45, 0.97)",
102                 "value": null
103               },
104               {
105                 "color": "rgba(237, 129, 40, 0.89)",
106                 "value": 50
107               },
108               {
109                 "color": "rgba(245, 54, 54, 0.9)",
110                 "value": 90
111               }
112             ]
113           },
114           "unit": "percent"
115         },
116         "overrides": []
117       },
118       "gridPos": {
119         "h": 5,
120         "w": 4,
121         "x": 0,
122         "y": 0
123       },
124       "id": 16,
125       "links": [],
126       "maxDataPoints": 100,
127       "options": {
128         "orientation": "horizontal",
129         "reduceOptions": {
130           "calcs": [
131             "lastNotNull"
132           ],
133           "fields": "/^iowait$/",
134           "values": false
135         },
136         "showThresholdLabels": false,
137         "showThresholdMarkers": true
138       },
139       "pluginVersion": "8.4.5",
140       "targets": [
141         {
142           "expr": "sum(rate(node_cpu_seconds_total{instance=\"$host\", mode=\"iowait\"}[$interval])) by (mode)* 100 / scalar(count(node_cpu_seconds_total{mode=\"user\", instance=\"$host\"})) or sum(irate(node_cpu_seconds_total{instance=\"$host\", mode=\"iowait\"}[5m])) by (mode) * 100 / scalar(count(node_cpu_seconds_total{mode=\"user\", instance=\"$host\"}))",
143           "format": "time_series",
144           "interval": "",
145           "intervalFactor": 2,
146           "legendFormat": "{{mode}}",
147           "refId": "A",
148           "step": 4
149         }
150       ],
151       "title": "Current IOwait",
152       "type": "gauge"
153     },
154     {
155       "datasource": {
156         "type": "prometheus",
157         "uid": "${DS_PROMETHEUS}"
158       },
159       "fieldConfig": {
160         "defaults": {
161           "color": {
162             "mode": "thresholds"
163           },
164           "mappings": [
165             {
166               "options": {
167                 "match": "null",
168                 "result": {
169                   "text": "N/A"
170                 }
171               },
172               "type": "special"
173             }
174           ],
175           "max": 100,
176           "min": 0,
177           "thresholds": {
178             "mode": "absolute",
179             "steps": [
180               {
181                 "color": "rgba(50, 172, 45, 0.97)",
182                 "value": null
183               },
184               {
185                 "color": "rgba(237, 129, 40, 0.89)",
186                 "value": 50
187               },
188               {
189                 "color": "rgba(245, 54, 54, 0.9)",
190                 "value": 80
191               }
192             ]
193           },
194           "unit": "percent"
195         },
196         "overrides": []
197       },
198       "gridPos": {
199         "h": 5,
200         "w": 4,
201         "x": 4,
202         "y": 0
203       },
204       "id": 15,
205       "links": [],
206       "maxDataPoints": 100,
207       "options": {
208         "orientation": "horizontal",
209         "reduceOptions": {
210           "calcs": [
211             "lastNotNull"
212           ],
213           "fields": "/^user$/",
214           "values": false
215         },
216         "showThresholdLabels": false,
217         "showThresholdMarkers": true
218       },
219       "pluginVersion": "8.4.5",
220       "targets": [
221         {
222           "expr": "sum(rate(node_cpu_seconds_total{instance=\"$host\", mode=\"user\"}[$interval])) by (mode)* 100 / scalar(count(node_cpu_seconds_total{mode=\"user\", instance=\"$host\"})) or sum(irate(node_cpu_seconds_total{instance=\"$host\", mode=\"user\"}[5m])) by (mode) * 100 / scalar(count(node_cpu_seconds_total{mode=\"user\", instance=\"$host\"}))",
223           "format": "time_series",
224           "interval": "$interval",
225           "intervalFactor": 2,
226           "legendFormat": "{{mode}}",
227           "refId": "A",
228           "step": 4
229         }
230       ],
231       "title": "Current CPU",
232       "type": "gauge"
233     },
234     {
235       "datasource": {
236         "type": "prometheus",
237         "uid": "${DS_PROMETHEUS}"
238       },
239       "fieldConfig": {
240         "defaults": {
241           "color": {
242             "mode": "thresholds"
243           },
244           "mappings": [
245             {
246               "options": {
247                 "match": "null",
248                 "result": {
249                   "text": "N/A"
250                 }
251               },
252               "type": "special"
253             }
254           ],
255           "thresholds": {
256             "mode": "absolute",
257             "steps": [
258               {
259                 "color": "rgba(50, 172, 45, 0.97)",
260                 "value": null
261               },
262               {
263                 "color": "rgba(237, 129, 40, 0.89)",
264                 "value": 50
265               },
266               {
267                 "color": "rgba(245, 54, 54, 0.9)",
268                 "value": 90
269               }
270             ]
271           },
272           "unit": "percent"
273         },
274         "overrides": []
275       },
276       "gridPos": {
277         "h": 5,
278         "w": 2,
279         "x": 8,
280         "y": 0
281       },
282       "id": 17,
283       "links": [],
284       "maxDataPoints": 100,
285       "options": {
286         "colorMode": "background",
287         "graphMode": "none",
288         "justifyMode": "auto",
289         "orientation": "horizontal",
290         "reduceOptions": {
291           "calcs": [
292             "lastNotNull"
293           ],
294           "fields": "/^Used$/",
295           "values": false
296         },
297         "textMode": "auto"
298       },
299       "pluginVersion": "8.4.5",
300       "targets": [
301         {
302           "expr": "(node_memory_MemTotal_bytes{instance=\"$host\"} - (node_memory_MemFree_bytes{instance=\"$host\"} + node_memory_Buffers_bytes{instance=\"$host\"} + node_memory_Cached_bytes{instance=\"$host\"})) / node_memory_MemTotal_bytes{instance=\"$host\"} * 100",
303           "format": "time_series",
304           "interval": "$interval",
305           "intervalFactor": 1,
306           "legendFormat": "Used",
307           "refId": "A",
308           "step": 2
309         }
310       ],
311       "title": "RAM used",
312       "type": "stat"
313     },
314     {
315       "datasource": {
316         "type": "prometheus",
317         "uid": "${DS_PROMETHEUS}"
318       },
319       "fieldConfig": {
320         "defaults": {
321           "color": {
322             "mode": "thresholds"
323           },
324           "mappings": [
325             {
326               "options": {
327                 "match": "null",
328                 "result": {
329                   "text": "N/A"
330                 }
331               },
332               "type": "special"
333             }
334           ],
335           "thresholds": {
336             "mode": "absolute",
337             "steps": [
338               {
339                 "color": "rgba(245, 54, 54, 0.9)",
340                 "value": null
341               },
342               {
343                 "color": "rgba(237, 129, 40, 0.89)",
344                 "value": 50
345               },
346               {
347                 "color": "rgba(50, 172, 45, 0.97)",
348                 "value": 90
349               }
350             ]
351           },
352           "unit": "percent"
353         },
354         "overrides": []
355       },
356       "gridPos": {
357         "h": 5,
358         "w": 2,
359         "x": 10,
360         "y": 0
361       },
362       "id": 19,
363       "links": [],
364       "maxDataPoints": 100,
365       "options": {
366         "colorMode": "background",
367         "graphMode": "none",
368         "justifyMode": "auto",
369         "orientation": "horizontal",
370         "reduceOptions": {
371           "calcs": [
372             "lastNotNull"
373           ],
374           "fields": "/^Used$/",
375           "values": false
376         },
377         "textMode": "auto"
378       },
379       "pluginVersion": "8.4.5",
380       "targets": [
381         {
382           "expr": "(node_memory_Cached_bytes{instance=\"$host\"} * 100) / node_memory_MemTotal_bytes{instance=\"$host\"}",
383           "format": "time_series",
384           "interval": "$interval",
385           "intervalFactor": 1,
386           "legendFormat": "Used",
387           "refId": "A",
388           "step": 2
389         }
390       ],
391       "title": "RAM cached",
392       "type": "stat"
393     },
394     {
395       "datasource": {
396         "type": "prometheus",
397         "uid": "${DS_PROMETHEUS}"
398       },
399       "fieldConfig": {
400         "defaults": {
401           "color": {
402             "mode": "thresholds"
403           },
404           "mappings": [
405             {
406               "options": {
407                 "match": "null",
408                 "result": {
409                   "text": "N/A"
410                 }
411               },
412               "type": "special"
413             }
414           ],
415           "thresholds": {
416             "mode": "absolute",
417             "steps": [
418               {
419                 "color": "green",
420                 "value": null
421               },
422               {
423                 "color": "red",
424                 "value": 80
425               }
426             ]
427           },
428           "unit": "decbytes"
429         },
430         "overrides": []
431       },
432       "gridPos": {
433         "h": 5,
434         "w": 4,
435         "x": 12,
436         "y": 0
437       },
438       "id": 10,
439       "links": [],
440       "maxDataPoints": 100,
441       "options": {
442         "colorMode": "none",
443         "graphMode": "none",
444         "justifyMode": "auto",
445         "orientation": "horizontal",
446         "reduceOptions": {
447           "calcs": [
448             "lastNotNull"
449           ],
450           "fields": "",
451           "values": false
452         },
453         "textMode": "auto"
454       },
455       "pluginVersion": "8.4.5",
456       "targets": [
457         {
458           "expr": "SUM(pg_stat_database_tup_fetched{datname=~\"$datname\", instance=~\"$instance\"})",
459           "format": "time_series",
460           "intervalFactor": 2,
461           "refId": "A",
462           "step": 4
463         }
464       ],
465       "title": "Current fetch data",
466       "type": "stat"
467     },
468     {
469       "datasource": {
470         "type": "prometheus",
471         "uid": "${DS_PROMETHEUS}"
472       },
473       "fieldConfig": {
474         "defaults": {
475           "color": {
476             "mode": "thresholds"
477           },
478           "mappings": [
479             {
480               "options": {
481                 "match": "null",
482                 "result": {
483                   "text": "N/A"
484                 }
485               },
486               "type": "special"
487             }
488           ],
489           "thresholds": {
490             "mode": "absolute",
491             "steps": [
492               {
493                 "color": "green",
494                 "value": null
495               },
496               {
497                 "color": "red",
498                 "value": 80
499               }
500             ]
501           },
502           "unit": "decbytes"
503         },
504         "overrides": []
505       },
506       "gridPos": {
507         "h": 5,
508         "w": 4,
509         "x": 16,
510         "y": 0
511       },
512       "id": 11,
513       "links": [],
514       "maxDataPoints": 100,
515       "options": {
516         "colorMode": "none",
517         "graphMode": "none",
518         "justifyMode": "auto",
519         "orientation": "horizontal",
520         "reduceOptions": {
521           "calcs": [
522             "lastNotNull"
523           ],
524           "fields": "",
525           "values": false
526         },
527         "textMode": "auto"
528       },
529       "pluginVersion": "8.4.5",
530       "targets": [
531         {
532           "expr": "SUM(pg_stat_database_tup_inserted{datname=~\"$datname\", instance=~\"$instance\"})",
533           "format": "time_series",
534           "intervalFactor": 2,
535           "refId": "A",
536           "step": 4
537         }
538       ],
539       "title": "Current insert data",
540       "type": "stat"
541     },
542     {
543       "datasource": {
544         "type": "prometheus",
545         "uid": "${DS_PROMETHEUS}"
546       },
547       "fieldConfig": {
548         "defaults": {
549           "color": {
550             "mode": "thresholds"
551           },
552           "mappings": [
553             {
554               "options": {
555                 "match": "null",
556                 "result": {
557                   "text": "N/A"
558                 }
559               },
560               "type": "special"
561             }
562           ],
563           "thresholds": {
564             "mode": "absolute",
565             "steps": [
566               {
567                 "color": "green",
568                 "value": null
569               },
570               {
571                 "color": "red",
572                 "value": 80
573               }
574             ]
575           },
576           "unit": "decbytes"
577         },
578         "overrides": []
579       },
580       "gridPos": {
581         "h": 5,
582         "w": 4,
583         "x": 20,
584         "y": 0
585       },
586       "id": 12,
587       "links": [],
588       "maxDataPoints": 100,
589       "options": {
590         "colorMode": "none",
591         "graphMode": "none",
592         "justifyMode": "auto",
593         "orientation": "horizontal",
594         "reduceOptions": {
595           "calcs": [
596             "lastNotNull"
597           ],
598           "fields": "",
599           "values": false
600         },
601         "textMode": "auto"
602       },
603       "pluginVersion": "8.4.5",
604       "targets": [
605         {
606           "expr": "SUM(pg_stat_database_tup_updated{datname=~\"$datname\", instance=~\"$instance\"})",
607           "format": "time_series",
608           "intervalFactor": 2,
609           "refId": "A",
610           "step": 4
611         }
612       ],
613       "title": "Current update data",
614       "type": "stat"
615     },
616     {
617       "aliasColors": {},
618       "bars": false,
619       "dashLength": 10,
620       "dashes": false,
621       "datasource": {
622         "type": "prometheus",
623         "uid": "${DS_PROMETHEUS}"
624       },
625       "fill": 1,
626       "fillGradient": 0,
627       "gridPos": {
628         "h": 7,
629         "w": 8,
630         "x": 0,
631         "y": 5
632       },
633       "hiddenSeries": false,
634       "id": 5,
635       "legend": {
636         "alignAsTable": true,
637         "avg": true,
638         "current": true,
639         "max": true,
640         "min": false,
641         "show": true,
642         "sort": "current",
643         "sortDesc": true,
644         "total": true,
645         "values": true
646       },
647       "lines": true,
648       "linewidth": 1,
649       "links": [],
650       "nullPointMode": "null",
651       "options": {
652         "alertThreshold": true
653       },
654       "percentage": false,
655       "pluginVersion": "8.4.5",
656       "pointradius": 5,
657       "points": false,
658       "renderer": "flot",
659       "seriesOverrides": [],
660       "spaceLength": 10,
661       "stack": false,
662       "steppedLine": false,
663       "targets": [
664         {
665           "expr": "pg_stat_database_tup_fetched{datname=~\"$datname\", instance=~\"$instance\"} != 0",
666           "format": "time_series",
667           "intervalFactor": 2,
668           "legendFormat": "{{instance}}, {{datname}}",
669           "refId": "A",
670           "step": 2
671         }
672       ],
673       "thresholds": [],
674       "timeRegions": [],
675       "title": "Fetch data (SELECT)",
676       "tooltip": {
677         "shared": true,
678         "sort": 0,
679         "value_type": "individual"
680       },
681       "type": "graph",
682       "xaxis": {
683         "mode": "time",
684         "show": true,
685         "values": []
686       },
687       "yaxes": [
688         {
689           "format": "bytes",
690           "logBase": 1,
691           "show": true
692         },
693         {
694           "format": "short",
695           "logBase": 1,
696           "show": true
697         }
698       ],
699       "yaxis": {
700         "align": false
701       }
702     },
703     {
704       "aliasColors": {},
705       "bars": false,
706       "dashLength": 10,
707       "dashes": false,
708       "datasource": {
709         "type": "prometheus",
710         "uid": "${DS_PROMETHEUS}"
711       },
712       "fill": 1,
713       "fillGradient": 0,
714       "gridPos": {
715         "h": 7,
716         "w": 8,
717         "x": 8,
718         "y": 5
719       },
720       "hiddenSeries": false,
721       "id": 6,
722       "legend": {
723         "alignAsTable": true,
724         "avg": true,
725         "current": true,
726         "max": true,
727         "min": false,
728         "show": true,
729         "sort": "current",
730         "sortDesc": true,
731         "total": true,
732         "values": true
733       },
734       "lines": true,
735       "linewidth": 1,
736       "links": [],
737       "nullPointMode": "null",
738       "options": {
739         "alertThreshold": true
740       },
741       "percentage": false,
742       "pluginVersion": "8.4.5",
743       "pointradius": 5,
744       "points": false,
745       "renderer": "flot",
746       "seriesOverrides": [],
747       "spaceLength": 10,
748       "stack": false,
749       "steppedLine": false,
750       "targets": [
751         {
752           "expr": "pg_stat_database_tup_inserted{datname=~\"$datname\", instance=~\"$instance\"} != 0",
753           "format": "time_series",
754           "intervalFactor": 2,
755           "legendFormat": "{{instance}}, {{datname}}",
756           "refId": "A",
757           "step": 2
758         }
759       ],
760       "thresholds": [],
761       "timeRegions": [],
762       "title": "Insert data",
763       "tooltip": {
764         "shared": true,
765         "sort": 0,
766         "value_type": "individual"
767       },
768       "type": "graph",
769       "xaxis": {
770         "mode": "time",
771         "show": true,
772         "values": []
773       },
774       "yaxes": [
775         {
776           "format": "bytes",
777           "logBase": 1,
778           "show": true
779         },
780         {
781           "format": "short",
782           "logBase": 1,
783           "show": true
784         }
785       ],
786       "yaxis": {
787         "align": false
788       }
789     },
790     {
791       "aliasColors": {},
792       "bars": false,
793       "dashLength": 10,
794       "dashes": false,
795       "datasource": {
796         "type": "prometheus",
797         "uid": "${DS_PROMETHEUS}"
798       },
799       "fill": 1,
800       "fillGradient": 0,
801       "gridPos": {
802         "h": 7,
803         "w": 8,
804         "x": 16,
805         "y": 5
806       },
807       "hiddenSeries": false,
808       "id": 8,
809       "legend": {
810         "alignAsTable": true,
811         "avg": true,
812         "current": true,
813         "max": true,
814         "min": false,
815         "show": true,
816         "sort": "current",
817         "sortDesc": true,
818         "total": true,
819         "values": true
820       },
821       "lines": true,
822       "linewidth": 1,
823       "links": [],
824       "nullPointMode": "null",
825       "options": {
826         "alertThreshold": true
827       },
828       "percentage": false,
829       "pluginVersion": "8.4.5",
830       "pointradius": 5,
831       "points": false,
832       "renderer": "flot",
833       "seriesOverrides": [],
834       "spaceLength": 10,
835       "stack": false,
836       "steppedLine": false,
837       "targets": [
838         {
839           "expr": "pg_stat_database_tup_updated{datname=~\"$datname\", instance=~\"$instance\"} != 0",
840           "format": "time_series",
841           "intervalFactor": 2,
842           "legendFormat": "{{instance}}, {{datname}}",
843           "refId": "A",
844           "step": 2
845         }
846       ],
847       "thresholds": [],
848       "timeRegions": [],
849       "title": "Update data",
850       "tooltip": {
851         "shared": true,
852         "sort": 0,
853         "value_type": "individual"
854       },
855       "type": "graph",
856       "xaxis": {
857         "mode": "time",
858         "show": true,
859         "values": []
860       },
861       "yaxes": [
862         {
863           "format": "bytes",
864           "logBase": 1,
865           "show": true
866         },
867         {
868           "format": "short",
869           "logBase": 1,
870           "show": true
871         }
872       ],
873       "yaxis": {
874         "align": false
875       }
876     },
877     {
878       "aliasColors": {},
879       "bars": false,
880       "dashLength": 10,
881       "dashes": false,
882       "datasource": {
883         "type": "prometheus",
884         "uid": "${DS_PROMETHEUS}"
885       },
886       "fill": 1,
887       "fillGradient": 0,
888       "gridPos": {
889         "h": 7,
890         "w": 8,
891         "x": 0,
892         "y": 12
893       },
894       "hiddenSeries": false,
895       "id": 1,
896       "legend": {
897         "alignAsTable": true,
898         "avg": true,
899         "current": true,
900         "max": true,
901         "min": false,
902         "show": true,
903         "sort": "current",
904         "sortDesc": true,
905         "total": false,
906         "values": true
907       },
908       "lines": false,
909       "linewidth": 1,
910       "links": [],
911       "nullPointMode": "connected",
912       "options": {
913         "alertThreshold": true
914       },
915       "percentage": false,
916       "pluginVersion": "8.4.5",
917       "pointradius": 3,
918       "points": true,
919       "renderer": "flot",
920       "seriesOverrides": [],
921       "spaceLength": 10,
922       "stack": false,
923       "steppedLine": false,
924       "targets": [
925         {
926           "expr": "pg_stat_activity_count{datname=~\"$datname\", instance=~\"$instance\", state=\"active\"} !=0",
927           "format": "time_series",
928           "interval": "",
929           "intervalFactor": 2,
930           "legendFormat": "{{instance}},{{datname}},state : {{state}}",
931           "refId": "A",
932           "step": 2
933         }
934       ],
935       "thresholds": [],
936       "timeRegions": [],
937       "title": "Active sessions",
938       "tooltip": {
939         "shared": true,
940         "sort": 0,
941         "value_type": "individual"
942       },
943       "type": "graph",
944       "xaxis": {
945         "mode": "time",
946         "show": true,
947         "values": []
948       },
949       "yaxes": [
950         {
951           "decimals": 0,
952           "format": "none",
953           "logBase": 1,
954           "show": true
955         },
956         {
957           "format": "short",
958           "logBase": 1,
959           "show": true
960         }
961       ],
962       "yaxis": {
963         "align": false
964       }
965     },
966     {
967       "aliasColors": {},
968       "bars": false,
969       "dashLength": 10,
970       "dashes": false,
971       "datasource": {
972         "type": "prometheus",
973         "uid": "${DS_PROMETHEUS}"
974       },
975       "fill": 1,
976       "fillGradient": 0,
977       "gridPos": {
978         "h": 7,
979         "w": 8,
980         "x": 8,
981         "y": 12
982       },
983       "hiddenSeries": false,
984       "id": 4,
985       "legend": {
986         "alignAsTable": true,
987         "avg": false,
988         "current": true,
989         "max": true,
990         "min": false,
991         "show": true,
992         "sort": "current",
993         "sortDesc": false,
994         "total": false,
995         "values": true
996       },
997       "lines": true,
998       "linewidth": 1,
999       "links": [],
1000       "nullPointMode": "null",
1001       "options": {
1002         "alertThreshold": true
1003       },
1004       "percentage": false,
1005       "pluginVersion": "8.4.5",
1006       "pointradius": 5,
1007       "points": false,
1008       "renderer": "flot",
1009       "seriesOverrides": [],
1010       "spaceLength": 10,
1011       "stack": false,
1012       "steppedLine": false,
1013       "targets": [
1014         {
1015           "expr": "pg_stat_activity_count{datname=~\"$datname\", instance=~\"$instance\", state=~\"idle|idle in transaction|idle in transaction (aborted)\"} !=0",
1016           "format": "time_series",
1017           "intervalFactor": 2,
1018           "legendFormat": "{{instance}},{{datname}},state : {{state}}",
1019           "refId": "A",
1020           "step": 2
1021         }
1022       ],
1023       "thresholds": [],
1024       "timeRegions": [],
1025       "title": "Idle sessions",
1026       "tooltip": {
1027         "shared": true,
1028         "sort": 0,
1029         "value_type": "individual"
1030       },
1031       "type": "graph",
1032       "xaxis": {
1033         "mode": "time",
1034         "show": true,
1035         "values": []
1036       },
1037       "yaxes": [
1038         {
1039           "format": "short",
1040           "logBase": 1,
1041           "show": true
1042         },
1043         {
1044           "format": "short",
1045           "logBase": 1,
1046           "show": true
1047         }
1048       ],
1049       "yaxis": {
1050         "align": false
1051       }
1052     },
1053     {
1054       "aliasColors": {},
1055       "bars": false,
1056       "dashLength": 10,
1057       "dashes": false,
1058       "datasource": {
1059         "type": "prometheus",
1060         "uid": "${DS_PROMETHEUS}"
1061       },
1062       "fill": 2,
1063       "fillGradient": 0,
1064       "gridPos": {
1065         "h": 7,
1066         "w": 8,
1067         "x": 16,
1068         "y": 12
1069       },
1070       "hiddenSeries": false,
1071       "id": 20,
1072       "legend": {
1073         "alignAsTable": true,
1074         "avg": true,
1075         "current": true,
1076         "max": true,
1077         "min": false,
1078         "show": true,
1079         "sort": "current",
1080         "sortDesc": true,
1081         "total": true,
1082         "values": true
1083       },
1084       "lines": true,
1085       "linewidth": 2,
1086       "links": [],
1087       "nullPointMode": "null",
1088       "options": {
1089         "alertThreshold": true
1090       },
1091       "percentage": false,
1092       "pluginVersion": "8.4.5",
1093       "pointradius": 5,
1094       "points": false,
1095       "renderer": "flot",
1096       "seriesOverrides": [],
1097       "spaceLength": 10,
1098       "stack": false,
1099       "steppedLine": true,
1100       "targets": [
1101         {
1102           "expr": "rate(node_disk_io_time_seconds_total{device=~\"$device\", instance=\"$host\"}[$interval])/10 or irate(node_disk_io_time_seconds_total{device=~\"$device\", instance=\"$host\"}[5m])/10",
1103           "format": "time_series",
1104           "interval": "$interval",
1105           "intervalFactor": 2,
1106           "legendFormat": "{{ device }}",
1107           "refId": "A",
1108           "step": 4
1109         }
1110       ],
1111       "thresholds": [],
1112       "timeRegions": [],
1113       "title": "Disk IO Utilization",
1114       "tooltip": {
1115         "shared": true,
1116         "sort": 0,
1117         "value_type": "individual"
1118       },
1119       "type": "graph",
1120       "xaxis": {
1121         "mode": "time",
1122         "show": true,
1123         "values": []
1124       },
1125       "yaxes": [
1126         {
1127           "$$hashKey": "object:333",
1128           "format": "percent",
1129           "logBase": 1,
1130           "min": "0",
1131           "show": true
1132         },
1133         {
1134           "$$hashKey": "object:334",
1135           "format": "short",
1136           "logBase": 1,
1137           "min": "0",
1138           "show": true
1139         }
1140       ],
1141       "yaxis": {
1142         "align": false
1143       }
1144     },
1145     {
1146       "aliasColors": {},
1147       "bars": false,
1148       "dashLength": 10,
1149       "dashes": false,
1150       "datasource": {
1151         "type": "prometheus",
1152         "uid": "${DS_PROMETHEUS}"
1153       },
1154       "fill": 1,
1155       "fillGradient": 0,
1156       "gridPos": {
1157         "h": 7,
1158         "w": 8,
1159         "x": 0,
1160         "y": 19
1161       },
1162       "hiddenSeries": false,
1163       "id": 7,
1164       "legend": {
1165         "alignAsTable": true,
1166         "avg": true,
1167         "current": true,
1168         "max": true,
1169         "min": false,
1170         "show": true,
1171         "sort": "current",
1172         "sortDesc": true,
1173         "total": true,
1174         "values": true
1175       },
1176       "lines": true,
1177       "linewidth": 1,
1178       "links": [],
1179       "nullPointMode": "null",
1180       "percentage": false,
1181       "pluginVersion": "8.4.5",
1182       "pointradius": 5,
1183       "points": false,
1184       "renderer": "flot",
1185       "seriesOverrides": [],
1186       "spaceLength": 10,
1187       "stack": false,
1188       "steppedLine": false,
1189       "targets": [
1190         {
1191           "expr": "pg_stat_database_tup_deleted{datname=~\"$datname\", instance=~\"$instance\"} != 0",
1192           "format": "time_series",
1193           "intervalFactor": 2,
1194           "legendFormat": "{{instance}}, {{datname}}",
1195           "refId": "A",
1196           "step": 2
1197         }
1198       ],
1199       "thresholds": [],
1200       "timeRegions": [],
1201       "title": "Delete data",
1202       "tooltip": {
1203         "shared": true,
1204         "sort": 0,
1205         "value_type": "individual"
1206       },
1207       "type": "graph",
1208       "xaxis": {
1209         "mode": "time",
1210         "show": true,
1211         "values": []
1212       },
1213       "yaxes": [
1214         {
1215           "format": "bytes",
1216           "logBase": 1,
1217           "show": true
1218         },
1219         {
1220           "format": "short",
1221           "logBase": 1,
1222           "show": true
1223         }
1224       ],
1225       "yaxis": {
1226         "align": false
1227       }
1228     },
1229     {
1230       "aliasColors": {},
1231       "bars": false,
1232       "dashLength": 10,
1233       "dashes": false,
1234       "datasource": {
1235         "type": "prometheus",
1236         "uid": "${DS_PROMETHEUS}"
1237       },
1238       "fill": 1,
1239       "fillGradient": 0,
1240       "gridPos": {
1241         "h": 7,
1242         "w": 8,
1243         "x": 8,
1244         "y": 19
1245       },
1246       "hiddenSeries": false,
1247       "id": 14,
1248       "legend": {
1249         "alignAsTable": true,
1250         "avg": true,
1251         "current": true,
1252         "max": true,
1253         "min": false,
1254         "show": true,
1255         "sort": "total",
1256         "sortDesc": true,
1257         "total": true,
1258         "values": true
1259       },
1260       "lines": true,
1261       "linewidth": 1,
1262       "links": [],
1263       "nullPointMode": "null",
1264       "percentage": false,
1265       "pluginVersion": "8.4.5",
1266       "pointradius": 5,
1267       "points": false,
1268       "renderer": "flot",
1269       "seriesOverrides": [],
1270       "spaceLength": 10,
1271       "stack": false,
1272       "steppedLine": false,
1273       "targets": [
1274         {
1275           "expr": "pg_stat_database_tup_returned{datname=~\"$datname\", instance=~\"$instance\"} != 0",
1276           "format": "time_series",
1277           "intervalFactor": 2,
1278           "legendFormat": "{{instance}}, {{datname}}",
1279           "refId": "A",
1280           "step": 2
1281         }
1282       ],
1283       "thresholds": [],
1284       "timeRegions": [],
1285       "title": "Return data",
1286       "tooltip": {
1287         "shared": true,
1288         "sort": 0,
1289         "value_type": "individual"
1290       },
1291       "type": "graph",
1292       "xaxis": {
1293         "mode": "time",
1294         "show": true,
1295         "values": []
1296       },
1297       "yaxes": [
1298         {
1299           "format": "bytes",
1300           "logBase": 1,
1301           "show": true
1302         },
1303         {
1304           "format": "short",
1305           "logBase": 1,
1306           "show": true
1307         }
1308       ],
1309       "yaxis": {
1310         "align": false
1311       }
1312     },
1313     {
1314       "aliasColors": {},
1315       "bars": false,
1316       "dashLength": 10,
1317       "dashes": false,
1318       "datasource": {
1319         "type": "prometheus",
1320         "uid": "${DS_PROMETHEUS}"
1321       },
1322       "fill": 1,
1323       "fillGradient": 0,
1324       "gridPos": {
1325         "h": 7,
1326         "w": 8,
1327         "x": 16,
1328         "y": 19
1329       },
1330       "hiddenSeries": false,
1331       "id": 3,
1332       "legend": {
1333         "alignAsTable": true,
1334         "avg": true,
1335         "current": true,
1336         "hideEmpty": false,
1337         "max": true,
1338         "min": false,
1339         "rightSide": false,
1340         "show": true,
1341         "sort": "current",
1342         "sortDesc": true,
1343         "total": true,
1344         "values": true
1345       },
1346       "lines": true,
1347       "linewidth": 1,
1348       "links": [],
1349       "nullPointMode": "null",
1350       "percentage": false,
1351       "pluginVersion": "8.4.5",
1352       "pointradius": 5,
1353       "points": false,
1354       "renderer": "flot",
1355       "seriesOverrides": [],
1356       "spaceLength": 10,
1357       "stack": false,
1358       "steppedLine": false,
1359       "targets": [
1360         {
1361           "expr": "pg_locks_count{datname=~\"$datname\", instance=~\"$instance\", mode=~\"$mode\"} != 0",
1362           "format": "time_series",
1363           "intervalFactor": 2,
1364           "legendFormat": "{{instance}},{{datname}},{{mode}}",
1365           "refId": "A",
1366           "step": 2
1367         }
1368       ],
1369       "thresholds": [],
1370       "timeRegions": [],
1371       "title": "Lock tables",
1372       "tooltip": {
1373         "shared": true,
1374         "sort": 0,
1375         "value_type": "individual"
1376       },
1377       "type": "graph",
1378       "xaxis": {
1379         "mode": "time",
1380         "show": true,
1381         "values": []
1382       },
1383       "yaxes": [
1384         {
1385           "$$hashKey": "object:386",
1386           "decimals": 0,
1387           "format": "short",
1388           "logBase": 1,
1389           "min": "0",
1390           "show": true
1391         },
1392         {
1393           "$$hashKey": "object:387",
1394           "format": "short",
1395           "logBase": 1,
1396           "show": true
1397         }
1398       ],
1399       "yaxis": {
1400         "align": false
1401       }
1402     },
1403     {
1404       "aliasColors": {},
1405       "bars": false,
1406       "dashLength": 10,
1407       "dashes": false,
1408       "datasource": {
1409         "type": "prometheus",
1410         "uid": "${DS_PROMETHEUS}"
1411       },
1412       "fill": 1,
1413       "fillGradient": 0,
1414       "gridPos": {
1415         "h": 7,
1416         "w": 12,
1417         "x": 0,
1418         "y": 26
1419       },
1420       "hiddenSeries": false,
1421       "id": 9,
1422       "legend": {
1423         "alignAsTable": true,
1424         "avg": false,
1425         "current": true,
1426         "max": false,
1427         "min": false,
1428         "rightSide": true,
1429         "show": true,
1430         "sort": "current",
1431         "sortDesc": true,
1432         "total": false,
1433         "values": true
1434       },
1435       "lines": true,
1436       "linewidth": 1,
1437       "links": [],
1438       "nullPointMode": "null",
1439       "percentage": false,
1440       "pluginVersion": "8.4.5",
1441       "pointradius": 5,
1442       "points": false,
1443       "renderer": "flot",
1444       "seriesOverrides": [],
1445       "spaceLength": 10,
1446       "stack": false,
1447       "steppedLine": false,
1448       "targets": [
1449         {
1450           "expr": "1 - node_filesystem_free_bytes{instance=~\"$host\", fstype!~\"rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs\"} / node_filesystem_size_bytes{fstype!~\"rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs\"}",
1451           "format": "time_series",
1452           "interval": "",
1453           "intervalFactor": 2,
1454           "legendFormat": "{{instance}} , {{mountpoint}}",
1455           "refId": "A",
1456           "step": 2
1457         }
1458       ],
1459       "thresholds": [],
1460       "timeRegions": [],
1461       "title": "Disk Use",
1462       "tooltip": {
1463         "shared": true,
1464         "sort": 0,
1465         "value_type": "individual"
1466       },
1467       "type": "graph",
1468       "xaxis": {
1469         "mode": "time",
1470         "show": true,
1471         "values": []
1472       },
1473       "yaxes": [
1474         {
1475           "$$hashKey": "object:173",
1476           "format": "percentunit",
1477           "logBase": 1,
1478           "show": true
1479         },
1480         {
1481           "$$hashKey": "object:174",
1482           "format": "short",
1483           "logBase": 1,
1484           "show": true
1485         }
1486       ],
1487       "yaxis": {
1488         "align": false
1489       }
1490     },
1491     {
1492       "aliasColors": {},
1493       "bars": false,
1494       "dashLength": 10,
1495       "dashes": false,
1496       "datasource": {
1497         "type": "prometheus",
1498         "uid": "${DS_PROMETHEUS}"
1499       },
1500       "fill": 1,
1501       "fillGradient": 0,
1502       "gridPos": {
1503         "h": 7,
1504         "w": 12,
1505         "x": 12,
1506         "y": 26
1507       },
1508       "hiddenSeries": false,
1509       "id": 13,
1510       "legend": {
1511         "alignAsTable": true,
1512         "avg": true,
1513         "current": true,
1514         "hideEmpty": true,
1515         "hideZero": true,
1516         "max": true,
1517         "min": true,
1518         "rightSide": false,
1519         "show": true,
1520         "sort": "current",
1521         "sortDesc": true,
1522         "total": true,
1523         "values": true
1524       },
1525       "lines": false,
1526       "linewidth": 1,
1527       "links": [],
1528       "nullPointMode": "null",
1529       "percentage": false,
1530       "pluginVersion": "8.4.5",
1531       "pointradius": 1,
1532       "points": true,
1533       "renderer": "flot",
1534       "seriesOverrides": [],
1535       "spaceLength": 10,
1536       "stack": false,
1537       "steppedLine": false,
1538       "targets": [
1539         {
1540           "expr": "(rate(node_disk_read_time_seconds_total{device=~\"$device\", instance=\"$host\"}[$interval]) / rate(node_disk_reads_completed_total{device=~\"$device\", instance=\"$host\"}[$interval])) or (irate(node_disk_read_seconds_total{device=~\"$device\", instance=\"$host\"}[5m]) / irate(node_disk_reads_completed_total{device=~\"$device\", instance=\"$host\"}[5m]))",
1541           "format": "time_series",
1542           "hide": false,
1543           "interval": "$interval",
1544           "intervalFactor": 1,
1545           "legendFormat": "Read: {{ device }}",
1546           "refId": "A",
1547           "step": 2
1548         },
1549         {
1550           "expr": "(rate(node_disk_write_time_seconds_total{device=~\"$device\", instance=\"$host\"}[$interval]) / rate(node_disk_writes_completed_total{device=~\"$device\", instance=\"$host\"}[$interval])) or (irate(node_disk_write_time_seconds_total{device=~\"$device\", instance=\"$host\"}[5m]) / irate(node_disk_writes_completed_total{device=~\"$device\", instance=\"$host\"}[5m]))",
1551           "format": "time_series",
1552           "interval": "$interval",
1553           "intervalFactor": 1,
1554           "legendFormat": "Write: {{ device }}",
1555           "refId": "B",
1556           "step": 2
1557         }
1558       ],
1559       "thresholds": [],
1560       "timeRegions": [],
1561       "title": "Disk Latency",
1562       "tooltip": {
1563         "shared": true,
1564         "sort": 0,
1565         "value_type": "individual"
1566       },
1567       "type": "graph",
1568       "xaxis": {
1569         "mode": "time",
1570         "show": true,
1571         "values": []
1572       },
1573       "yaxes": [
1574         {
1575           "$$hashKey": "object:437",
1576           "format": "ms",
1577           "logBase": 2,
1578           "show": true
1579         },
1580         {
1581           "$$hashKey": "object:438",
1582           "format": "ms",
1583           "logBase": 1,
1584           "show": true
1585         }
1586       ],
1587       "yaxis": {
1588         "align": false
1589       }
1590     }
1591   ],
1592   "refresh": false,
1593   "schemaVersion": 35,
1594   "style": "dark",
1595   "tags": [
1596     "postgres"
1597   ],
1598   "templating": {
1599     "list": [
1600       {
1601         "auto": true,
1602         "auto_count": 200,
1603         "auto_min": "1s",
1604         "current": {
1605           "selected": false,
1606           "text": "auto",
1607           "value": "$__auto_interval_interval"
1608         },
1609         "hide": 0,
1610         "label": "Interval",
1611         "name": "interval",
1612         "options": [
1613           {
1614             "selected": true,
1615             "text": "auto",
1616             "value": "$__auto_interval_interval"
1617           },
1618           {
1619             "selected": false,
1620             "text": "1s",
1621             "value": "1s"
1622           },
1623           {
1624             "selected": false,
1625             "text": "5s",
1626             "value": "5s"
1627           },
1628           {
1629             "selected": false,
1630             "text": "1m",
1631             "value": "1m"
1632           },
1633           {
1634             "selected": false,
1635             "text": "5m",
1636             "value": "5m"
1637           },
1638           {
1639             "selected": false,
1640             "text": "1h",
1641             "value": "1h"
1642           },
1643           {
1644             "selected": false,
1645             "text": "6h",
1646             "value": "6h"
1647           },
1648           {
1649             "selected": false,
1650             "text": "1d",
1651             "value": "1d"
1652           }
1653         ],
1654         "query": "1s,5s,1m,5m,1h,6h,1d",
1655         "queryValue": "",
1656         "refresh": 2,
1657         "skipUrlSync": false,
1658         "type": "interval"
1659       },
1660       {
1661         "current": {},
1662         "datasource": {
1663           "type": "prometheus",
1664           "uid": "${DS_PROMETHEUS}"
1665         },
1666         "definition": "label_values(node_disk_reads_completed_total, instance)",
1667         "hide": 0,
1668         "includeAll": false,
1669         "label": "Host",
1670         "multi": false,
1671         "name": "host",
1672         "options": [],
1673         "query": {
1674           "query": "label_values(node_disk_reads_completed_total, instance)",
1675           "refId": "Prometheus-host-Variable-Query"
1676         },
1677         "refresh": 1,
1678         "regex": "",
1679         "skipUrlSync": false,
1680         "sort": 1,
1681         "tagValuesQuery": "",
1682         "tagsQuery": "",
1683         "type": "query",
1684         "useTags": false
1685       },
1686       {
1687         "current": {},
1688         "datasource": {
1689           "type": "prometheus",
1690           "uid": "${DS_PROMETHEUS}"
1691         },
1692         "definition": "label_values(node_disk_reads_completed_total{instance=\"$host\", device!~\"dm-.+\"}, device)",
1693         "hide": 0,
1694         "includeAll": true,
1695         "label": "Device",
1696         "multi": true,
1697         "name": "device",
1698         "options": [],
1699         "query": {
1700           "query": "label_values(node_disk_reads_completed_total{instance=\"$host\", device!~\"dm-.+\"}, device)",
1701           "refId": "Prometheus-device-Variable-Query"
1702         },
1703         "refresh": 1,
1704         "regex": "",
1705         "skipUrlSync": false,
1706         "sort": 1,
1707         "tagValuesQuery": "",
1708         "tagsQuery": "",
1709         "type": "query",
1710         "useTags": false
1711       },
1712       {
1713         "current": {},
1714         "datasource": {
1715           "type": "prometheus",
1716           "uid": "${DS_PROMETHEUS}"
1717         },
1718         "definition": "",
1719         "hide": 0,
1720         "includeAll": true,
1721         "label": "Instance",
1722         "multi": true,
1723         "name": "instance",
1724         "options": [],
1725         "query": {
1726           "query": "label_values({job=~\"postgresql|postgresql01|postgresql02|postgresql03\"}, instance)",
1727           "refId": "Prometheus-instance-Variable-Query"
1728         },
1729         "refresh": 1,
1730         "regex": "",
1731         "skipUrlSync": false,
1732         "sort": 1,
1733         "tagValuesQuery": "",
1734         "tagsQuery": "",
1735         "type": "query",
1736         "useTags": false
1737       },
1738       {
1739         "current": {},
1740         "datasource": {
1741           "type": "prometheus",
1742           "uid": "${DS_PROMETHEUS}"
1743         },
1744         "definition": "",
1745         "hide": 0,
1746         "includeAll": true,
1747         "label": "Database",
1748         "multi": true,
1749         "name": "datname",
1750         "options": [],
1751         "query": {
1752           "query": "label_values(datname)",
1753           "refId": "Prometheus-datname-Variable-Query"
1754         },
1755         "refresh": 1,
1756         "regex": "",
1757         "skipUrlSync": false,
1758         "sort": 1,
1759         "tagValuesQuery": "",
1760         "tagsQuery": "",
1761         "type": "query",
1762         "useTags": false
1763       },
1764       {
1765         "current": {},
1766         "datasource": {
1767           "type": "prometheus",
1768           "uid": "${DS_PROMETHEUS}"
1769         },
1770         "definition": "",
1771         "hide": 0,
1772         "includeAll": true,
1773         "label": "Lock table",
1774         "multi": true,
1775         "name": "mode",
1776         "options": [],
1777         "query": {
1778           "query": "label_values({mode=~\"accessexclusivelock|accesssharelock|exclusivelock|rowexclusivelock|rowsharelock|sharelock|sharerowexclusivelock|shareupdateexclusivelock\"}, mode)",
1779           "refId": "Prometheus-mode-Variable-Query"
1780         },
1781         "refresh": 1,
1782         "regex": "",
1783         "skipUrlSync": false,
1784         "sort": 0,
1785         "tagValuesQuery": "",
1786         "tagsQuery": "",
1787         "type": "query",
1788         "useTags": false
1789       }
1790     ]
1791   },
1792   "time": {
1793     "from": "now-5m",
1794     "to": "now"
1795   },
1796   "timepicker": {
1797     "refresh_intervals": [
1798       "5s",
1799       "10s",
1800       "30s",
1801       "1m",
1802       "5m",
1803       "15m",
1804       "30m",
1805       "1h",
1806       "2h",
1807       "1d"
1808     ],
1809     "time_options": [
1810       "5m",
1811       "15m",
1812       "1h",
1813       "6h",
1814       "12h",
1815       "24h",
1816       "2d",
1817       "7d",
1818       "30d"
1819     ]
1820   },
1821   "timezone": "",
1822   "title": "Postgres exporter",
1823   "uid": "PGExporterDashboard",
1824   "version": 9,
1825   "weekStart": ""
1826 }