1
+ {
2
+ "annotations" : {
3
+ "list" : [
4
+ {
5
+ "builtIn" : 1 ,
6
+ "datasource" : {
7
+ "type" : " grafana" ,
8
+ "uid" : " -- Grafana --"
9
+ },
10
+ "enable" : true ,
11
+ "hide" : true ,
12
+ "iconColor" : " rgba(0, 211, 255, 1)" ,
13
+ "name" : " Annotations & Alerts" ,
14
+ "type" : " dashboard"
15
+ }
16
+ ]
17
+ },
18
+ "editable" : true ,
19
+ "fiscalYearStartMonth" : 0 ,
20
+ "graphTooltip" : 0 ,
21
+ "id" : 1 ,
22
+ "links" : [],
23
+ "panels" : [
24
+ {
25
+ "datasource" : {
26
+ "type" : " datasource" ,
27
+ "uid" : " -- Mixed --"
28
+ },
29
+ "fieldConfig" : {
30
+ "defaults" : {
31
+ "color" : {
32
+ "mode" : " palette-classic"
33
+ },
34
+ "custom" : {
35
+ "axisBorderShow" : false ,
36
+ "axisCenteredZero" : false ,
37
+ "axisColorMode" : " text" ,
38
+ "axisLabel" : " " ,
39
+ "axisPlacement" : " auto" ,
40
+ "barAlignment" : -1 ,
41
+ "barWidthFactor" : 0.6 ,
42
+ "drawStyle" : " line" ,
43
+ "fillOpacity" : 20 ,
44
+ "gradientMode" : " none" ,
45
+ "hideFrom" : {
46
+ "legend" : false ,
47
+ "tooltip" : false ,
48
+ "viz" : false
49
+ },
50
+ "insertNulls" : false ,
51
+ "lineInterpolation" : " linear" ,
52
+ "lineWidth" : 1 ,
53
+ "pointSize" : 1 ,
54
+ "scaleDistribution" : {
55
+ "type" : " linear"
56
+ },
57
+ "showPoints" : " auto" ,
58
+ "spanNulls" : false ,
59
+ "stacking" : {
60
+ "group" : " A" ,
61
+ "mode" : " normal"
62
+ },
63
+ "thresholdsStyle" : {
64
+ "mode" : " off"
65
+ }
66
+ },
67
+ "mappings" : [],
68
+ "thresholds" : {
69
+ "mode" : " absolute" ,
70
+ "steps" : [
71
+ {
72
+ "color" : " green"
73
+ },
74
+ {
75
+ "color" : " red" ,
76
+ "value" : 80
77
+ }
78
+ ]
79
+ }
80
+ },
81
+ "overrides" : [
82
+ {
83
+ "matcher" : {
84
+ "id" : " byRegexp" ,
85
+ "options" : " .*"
86
+ },
87
+ "properties" : [
88
+ {
89
+ "id" : " displayName" ,
90
+ "value" : " ${__field.labels.query_text}"
91
+ }
92
+ ]
93
+ }
94
+ ]
95
+ },
96
+ "gridPos" : {
97
+ "h" : 8 ,
98
+ "w" : 12 ,
99
+ "x" : 0 ,
100
+ "y" : 0
101
+ },
102
+ "id" : 1 ,
103
+ "options" : {
104
+ "legend" : {
105
+ "calcs" : [],
106
+ "displayMode" : " list" ,
107
+ "placement" : " bottom" ,
108
+ "showLegend" : true
109
+ },
110
+ "tooltip" : {
111
+ "hideZeros" : false ,
112
+ "mode" : " single" ,
113
+ "sort" : " none"
114
+ }
115
+ },
116
+ "pluginVersion" : " 12.0.2" ,
117
+ "targets" : [
118
+ {
119
+ "datasource" : {
120
+ "type" : " prometheus" ,
121
+ "uid" : " P7A0D6631BB10B34F"
122
+ },
123
+ "disableTextWrap" : false ,
124
+ "editorMode" : " code" ,
125
+ "expr" : " pgwatch_pg_stat_statements_calls_calls" ,
126
+ "fullMetaSearch" : false ,
127
+ "hide" : false ,
128
+ "includeNullMetadata" : true ,
129
+ "legendFormat" : " __auto" ,
130
+ "range" : true ,
131
+ "refId" : " B" ,
132
+ "useBackend" : false
133
+ },
134
+ {
135
+ "datasource" : {
136
+ "type" : " grafana-postgresql-datasource" ,
137
+ "uid" : " P031DD592934B2F1F"
138
+ },
139
+ "editorMode" : " code" ,
140
+ "format" : " table" ,
141
+ "hide" : false ,
142
+ "rawQuery" : true ,
143
+ "rawSql" : " SELECT\n DISTINCT (data ->> 'queryid') as queryid,\n data ->> 'query' as query_text\n FROM\n pgss_queryid_queries\n WHERE\n $__timeFilter(time)" ,
144
+ "refId" : " A" ,
145
+ "sql" : {
146
+ "columns" : [
147
+ {
148
+ "parameters" : [],
149
+ "type" : " function"
150
+ }
151
+ ],
152
+ "groupBy" : [
153
+ {
154
+ "property" : {
155
+ "type" : " string"
156
+ },
157
+ "type" : " groupBy"
158
+ }
159
+ ],
160
+ "limit" : 50
161
+ }
162
+ }
163
+ ],
164
+ "title" : " pg_stat_statements_calls_to_query" ,
165
+ "transformations" : [
166
+ {
167
+ "filter" : {
168
+ "id" : " byRefId" ,
169
+ "options" : " /^(?:B)$/"
170
+ },
171
+ "id" : " seriesToRows" ,
172
+ "options" : {}
173
+ },
174
+ {
175
+ "filter" : {
176
+ "id" : " byRefId" ,
177
+ "options" : " /^(?:seriesToRows-B-B-B-B-B-B-B-B-B)$/"
178
+ },
179
+ "id" : " extractFields" ,
180
+ "options" : {
181
+ "delimiter" : " ," ,
182
+ "keepTime" : false ,
183
+ "replace" : false ,
184
+ "source" : " Metric"
185
+ }
186
+ },
187
+ {
188
+ "id" : " joinByField" ,
189
+ "options" : {
190
+ "byField" : " queryid" ,
191
+ "mode" : " inner"
192
+ }
193
+ },
194
+ {
195
+ "id" : " filterFieldsByName" ,
196
+ "options" : {
197
+ "byVariable" : false ,
198
+ "include" : {
199
+ "names" : [
200
+ " Time" ,
201
+ " Value" ,
202
+ " query_text"
203
+ ]
204
+ }
205
+ }
206
+ },
207
+ {
208
+ "id" : " prepareTimeSeries" ,
209
+ "options" : {
210
+ "format" : " multi"
211
+ }
212
+ }
213
+ ],
214
+ "type" : " timeseries"
215
+ }
216
+ ],
217
+ "preload" : false ,
218
+ "refresh" : " auto" ,
219
+ "schemaVersion" : 41 ,
220
+ "tags" : [],
221
+ "templating" : {
222
+ "list" : []
223
+ },
224
+ "time" : {
225
+ "from" : " now-5m" ,
226
+ "to" : " now"
227
+ },
228
+ "timepicker" : {},
229
+ "timezone" : " browser" ,
230
+ "title" : " PoC" ,
231
+ "uid" : " 00eb62a7-4b80-43cd-a890-45336979aa18" ,
232
+ "version" : 2
233
+ }
0 commit comments