Adding OSM Monitoring dashboards to Grafana charm
[osm/devops.git] / installers / charm / grafana / files / mysql_exporter_dashboard.yaml
1 # Copyright 2021 Canonical Ltd.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may
4 # not use this file except in compliance with the License. You may obtain
5 # a copy of the License at
6 #
7 #         http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations
13 # under the License.
14 #
15 # For those usages not covered by the Apache License, Version 2.0 please
16 # contact: legal@canonical.com
17 #
18 # To get in touch with the maintainers, please contact:
19 # osm-charmers@lists.launchpad.net
20 ##
21
22 ---
23 annotations:
24   list:
25     - builtIn: 1
26       datasource: '-- Grafana --'
27       enable: true
28       hide: true
29       iconColor: 'rgba(0, 211, 255, 1)'
30       name: Annotations & Alerts
31       type: dashboard
32 description: Mysql dashboard
33 editable: true
34 gnetId: 6239
35 graphTooltip: 0
36 id: 34
37 iteration: 1569307668513
38 links: []
39 panels:
40   - collapsed: false
41     gridPos:
42       h: 1
43       w: 24
44       x: 0
45       'y': 0
46     id: 17
47     panels: []
48     title: Global status
49     type: row
50   - cacheTimeout: null
51     colorBackground: true
52     colorValue: false
53     colors:
54       - '#bf1b00'
55       - '#508642'
56       - '#ef843c'
57     datasource: Prometheus
58     format: none
59     gauge:
60       maxValue: 1
61       minValue: 0
62       show: false
63       thresholdLabels: false
64       thresholdMarkers: true
65     gridPos:
66       h: 7
67       w: 6
68       x: 0
69       'y': 1
70     id: 11
71     interval: null
72     links: []
73     mappingType: 1
74     mappingTypes:
75       - name: value to text
76         value: 1
77       - name: range to text
78         value: 2
79     maxDataPoints: 100
80     nullPointMode: connected
81     nullText: null
82     options: {}
83     postfix: ''
84     postfixFontSize: 50%
85     prefix: ''
86     prefixFontSize: 50%
87     rangeMaps:
88       - from: 'null'
89         text: N/A
90         to: 'null'
91     sparkline:
92       fillColor: 'rgba(31, 118, 189, 0.18)'
93       full: true
94       lineColor: 'rgb(31, 120, 193)'
95       show: true
96     tableColumn: ''
97     targets:
98       - expr: 'mysql_up{release="$release"}'
99         format: time_series
100         intervalFactor: 1
101         refId: A
102     thresholds: '1,2'
103     title: Instance Up
104     type: singlestat
105     valueFontSize: 80%
106     valueMaps:
107       - op: '='
108         text: N/A
109         value: 'null'
110     valueName: current
111   - cacheTimeout: null
112     colorBackground: true
113     colorValue: false
114     colors:
115       - '#d44a3a'
116       - 'rgba(237, 129, 40, 0.89)'
117       - '#508642'
118     datasource: Prometheus
119     format: s
120     gauge:
121       maxValue: 100
122       minValue: 0
123       show: false
124       thresholdLabels: false
125       thresholdMarkers: true
126     gridPos:
127       h: 7
128       w: 6
129       x: 6
130       'y': 1
131     id: 15
132     interval: null
133     links: []
134     mappingType: 1
135     mappingTypes:
136       - name: value to text
137         value: 1
138       - name: range to text
139         value: 2
140     maxDataPoints: 100
141     nullPointMode: connected
142     nullText: null
143     options: {}
144     postfix: ''
145     postfixFontSize: 50%
146     prefix: ''
147     prefixFontSize: 50%
148     rangeMaps:
149       - from: 'null'
150         text: N/A
151         to: 'null'
152     sparkline:
153       fillColor: 'rgba(31, 118, 189, 0.18)'
154       full: false
155       lineColor: 'rgb(31, 120, 193)'
156       show: true
157     tableColumn: ''
158     targets:
159       - expr: 'mysql_global_status_uptime{release="$release"}'
160         format: time_series
161         intervalFactor: 1
162         refId: A
163     thresholds: '25200,32400'
164     title: Uptime
165     type: singlestat
166     valueFontSize: 80%
167     valueMaps:
168       - op: '='
169         text: N/A
170         value: 'null'
171     valueName: current
172   - aliasColors: {}
173     bars: false
174     dashLength: 10
175     dashes: false
176     datasource: Prometheus
177     fill: 1
178     fillGradient: 0
179     gridPos:
180       h: 7
181       w: 12
182       x: 12
183       'y': 1
184     id: 29
185     legend:
186       avg: false
187       current: false
188       max: false
189       min: false
190       show: false
191       total: false
192       values: false
193     lines: true
194     linewidth: 1
195     links: []
196     nullPointMode: 'null'
197     options:
198       dataLinks: []
199     percentage: false
200     pointradius: 5
201     points: false
202     renderer: flot
203     seriesOverrides: []
204     spaceLength: 10
205     stack: false
206     steppedLine: false
207     targets:
208       - expr: 'mysql_global_status_max_used_connections{release="$release"}'
209         format: time_series
210         intervalFactor: 1
211         legendFormat: current
212         refId: A
213       - expr: 'mysql_global_variables_max_connections{release="$release"}'
214         format: time_series
215         intervalFactor: 1
216         legendFormat: Max
217         refId: B
218     thresholds: []
219     timeFrom: null
220     timeRegions: []
221     timeShift: null
222     title: Mysql Connections
223     tooltip:
224       shared: true
225       sort: 0
226       value_type: individual
227     type: graph
228     xaxis:
229       buckets: null
230       mode: time
231       name: null
232       show: true
233       values: []
234     yaxes:
235       - format: short
236         label: null
237         logBase: 1
238         max: null
239         min: null
240         show: true
241       - format: short
242         label: null
243         logBase: 1
244         max: null
245         min: null
246         show: true
247     yaxis:
248       align: false
249       alignLevel: null
250   - collapsed: false
251     gridPos:
252       h: 1
253       w: 24
254       x: 0
255       'y': 8
256     id: 19
257     panels: []
258     title: I/O
259     type: row
260   - aliasColors: {}
261     bars: false
262     dashLength: 10
263     dashes: false
264     datasource: Prometheus
265     fill: 1
266     fillGradient: 0
267     gridPos:
268       h: 9
269       w: 12
270       x: 0
271       'y': 9
272     id: 5
273     legend:
274       avg: false
275       current: false
276       max: false
277       min: false
278       show: true
279       total: false
280       values: false
281     lines: true
282     linewidth: 1
283     links: []
284     nullPointMode: 'null'
285     options:
286       dataLinks: []
287     percentage: false
288     pointradius: 5
289     points: false
290     renderer: flot
291     seriesOverrides:
292       - alias: write
293         transform: negative-Y
294     spaceLength: 10
295     stack: false
296     steppedLine: false
297     targets:
298       - expr: >-
299           'irate(mysql_global_status_innodb_data_reads{release="$release"}[10m])'
300         format: time_series
301         intervalFactor: 1
302         legendFormat: reads
303         refId: A
304       - expr: >-
305           'irate(mysql_global_status_innodb_data_writes{release="$release"}[10m])'
306         format: time_series
307         intervalFactor: 1
308         legendFormat: write
309         refId: B
310     thresholds: []
311     timeFrom: null
312     timeRegions: []
313     timeShift: null
314     title: mysql  disk reads vs writes
315     tooltip:
316       shared: true
317       sort: 0
318       value_type: individual
319     type: graph
320     xaxis:
321       buckets: null
322       mode: time
323       name: null
324       show: true
325       values: []
326     yaxes:
327       - format: short
328         label: null
329         logBase: 1
330         max: null
331         min: null
332         show: true
333       - format: short
334         label: null
335         logBase: 1
336         max: null
337         min: null
338         show: true
339     yaxis:
340       align: false
341       alignLevel: null
342   - aliasColors: {}
343     bars: false
344     dashLength: 10
345     dashes: false
346     datasource: Prometheus
347     fill: 1
348     fillGradient: 0
349     gridPos:
350       h: 9
351       w: 12
352       x: 12
353       'y': 9
354     id: 9
355     legend:
356       avg: false
357       current: false
358       max: false
359       min: false
360       show: false
361       total: false
362       values: false
363     lines: true
364     linewidth: 1
365     links: []
366     nullPointMode: 'null'
367     options:
368       dataLinks: []
369     percentage: false
370     pointradius: 5
371     points: false
372     renderer: flot
373     seriesOverrides:
374       - alias: /sent/
375         transform: negative-Y
376     spaceLength: 10
377     stack: false
378     steppedLine: false
379     targets:
380       - expr: >-
381           'irate(mysql_global_status_bytes_received{release="$release"}[5m])'
382         format: time_series
383         intervalFactor: 1
384         legendFormat: received
385         refId: A
386       - expr: 'irate(mysql_global_status_bytes_sent{release="$release"}[5m])'
387         format: time_series
388         intervalFactor: 1
389         legendFormat: sent
390         refId: B
391     thresholds: []
392     timeFrom: null
393     timeRegions: []
394     timeShift: null
395     title: mysql network received vs sent
396     tooltip:
397       shared: true
398       sort: 0
399       value_type: individual
400     type: graph
401     xaxis:
402       buckets: null
403       mode: time
404       name: null
405       show: true
406       values: []
407     yaxes:
408       - format: short
409         label: null
410         logBase: 1
411         max: null
412         min: null
413         show: true
414       - format: short
415         label: null
416         logBase: 1
417         max: null
418         min: null
419         show: true
420     yaxis:
421       align: false
422       alignLevel: null
423   - aliasColors: {}
424     bars: false
425     dashLength: 10
426     dashes: false
427     datasource: Prometheus
428     fill: 1
429     fillGradient: 0
430     gridPos:
431       h: 7
432       w: 12
433       x: 0
434       'y': 18
435     id: 2
436     legend:
437       avg: false
438       current: false
439       max: false
440       min: false
441       show: false
442       total: false
443       values: false
444     lines: true
445     linewidth: 1
446     links: []
447     nullPointMode: 'null'
448     options:
449       dataLinks: []
450     percentage: false
451     pointradius: 5
452     points: false
453     renderer: flot
454     seriesOverrides: []
455     spaceLength: 10
456     stack: false
457     steppedLine: false
458     targets:
459       - expr: >-
460           'irate(mysql_global_status_commands_total{release="$release"}[5m]) >'
461           '0'
462         format: time_series
463         intervalFactor: 1
464         legendFormat: '{{ command }} - {{ release }}'
465         refId: A
466     thresholds: []
467     timeFrom: null
468     timeRegions: []
469     timeShift: null
470     title: Query rates
471     tooltip:
472       shared: true
473       sort: 0
474       value_type: individual
475     type: graph
476     xaxis:
477       buckets: null
478       mode: time
479       name: null
480       show: true
481       values: []
482     yaxes:
483       - format: short
484         label: null
485         logBase: 1
486         max: null
487         min: null
488         show: true
489       - format: short
490         label: null
491         logBase: 1
492         max: null
493         min: null
494         show: true
495     yaxis:
496       align: false
497       alignLevel: null
498   - aliasColors: {}
499     bars: false
500     dashLength: 10
501     dashes: false
502     datasource: Prometheus
503     fill: 1
504     fillGradient: 0
505     gridPos:
506       h: 7
507       w: 12
508       x: 12
509       'y': 18
510     id: 25
511     legend:
512       avg: false
513       current: false
514       max: false
515       min: false
516       show: false
517       total: false
518       values: false
519     lines: true
520     linewidth: 1
521     links: []
522     nullPointMode: 'null'
523     options:
524       dataLinks: []
525     percentage: false
526     pointradius: 5
527     points: false
528     renderer: flot
529     seriesOverrides: []
530     spaceLength: 10
531     stack: false
532     steppedLine: false
533     targets:
534       - expr: 'mysql_global_status_threads_running{release="$release"} '
535         format: time_series
536         intervalFactor: 1
537         refId: A
538     thresholds: []
539     timeFrom: null
540     timeRegions: []
541     timeShift: null
542     title: Running Threads
543     tooltip:
544       shared: true
545       sort: 0
546       value_type: individual
547     type: graph
548     xaxis:
549       buckets: null
550       mode: time
551       name: null
552       show: true
553       values: []
554     yaxes:
555       - decimals: null
556         format: short
557         label: null
558         logBase: 1
559         max: '15'
560         min: null
561         show: true
562       - format: short
563         label: null
564         logBase: 1
565         max: null
566         min: null
567         show: true
568     yaxis:
569       align: false
570       alignLevel: null
571   - collapsed: false
572     gridPos:
573       h: 1
574       w: 24
575       x: 0
576       'y': 25
577     id: 21
578     panels: []
579     title: Errors
580     type: row
581   - aliasColors: {}
582     bars: false
583     dashLength: 10
584     dashes: false
585     datasource: Prometheus
586     description: >-
587       The number of connections that were aborted because the client died
588       without closing the connection properly.
589     fill: 1
590     fillGradient: 0
591     gridPos:
592       h: 9
593       w: 12
594       x: 0
595       'y': 26
596     id: 13
597     legend:
598       avg: false
599       current: false
600       max: false
601       min: false
602       show: false
603       total: false
604       values: false
605     lines: true
606     linewidth: 1
607     links: []
608     nullPointMode: 'null'
609     options:
610       dataLinks: []
611     percentage: false
612     pointradius: 5
613     points: false
614     renderer: flot
615     seriesOverrides: []
616     spaceLength: 10
617     stack: false
618     steppedLine: false
619     targets:
620       - expr: 'mysql_global_status_aborted_clients{release="$release"}'
621         format: time_series
622         intervalFactor: 1
623         refId: B
624     thresholds: []
625     timeFrom: null
626     timeRegions: []
627     timeShift: null
628     title: Aborted clients
629     tooltip:
630       shared: true
631       sort: 0
632       value_type: individual
633     type: graph
634     xaxis:
635       buckets: null
636       mode: time
637       name: null
638       show: true
639       values: []
640     yaxes:
641       - format: short
642         label: null
643         logBase: 1
644         max: null
645         min: null
646         show: true
647       - format: short
648         label: null
649         logBase: 1
650         max: null
651         min: null
652         show: true
653     yaxis:
654       align: false
655       alignLevel: null
656   - aliasColors: {}
657     bars: false
658     dashLength: 10
659     dashes: false
660     datasource: Prometheus
661     description: The number of failed attempts to connect to the MySQL server.
662     fill: 1
663     fillGradient: 0
664     gridPos:
665       h: 9
666       w: 12
667       x: 12
668       'y': 26
669     id: 4
670     legend:
671       avg: false
672       current: false
673       max: false
674       min: false
675       show: false
676       total: false
677       values: false
678     lines: true
679     linewidth: 1
680     links: []
681     nullPointMode: 'null'
682     options:
683       dataLinks: []
684     percentage: false
685     pointradius: 5
686     points: false
687     renderer: flot
688     seriesOverrides: []
689     spaceLength: 10
690     stack: false
691     steppedLine: false
692     targets:
693       - expr: 'mysql_global_status_aborted_connects{release="$release"}'
694         format: time_series
695         intervalFactor: 1
696         legendFormat: ''
697         refId: A
698     thresholds: []
699     timeFrom: null
700     timeRegions: []
701     timeShift: null
702     title: mysql aborted Connects
703     tooltip:
704       shared: true
705       sort: 0
706       value_type: individual
707     type: graph
708     xaxis:
709       buckets: null
710       mode: time
711       name: null
712       show: true
713       values: []
714     yaxes:
715       - format: short
716         label: null
717         logBase: 1
718         max: null
719         min: null
720         show: true
721       - format: short
722         label: null
723         logBase: 1
724         max: null
725         min: null
726         show: true
727     yaxis:
728       align: false
729       alignLevel: null
730   - collapsed: false
731     gridPos:
732       h: 1
733       w: 24
734       x: 0
735       'y': 35
736     id: 23
737     panels: []
738     title: Disk usage
739     type: row
740   - aliasColors: {}
741     bars: false
742     dashLength: 10
743     dashes: false
744     datasource: Prometheus
745     fill: 1
746     fillGradient: 0
747     gridPos:
748       h: 9
749       w: 12
750       x: 0
751       'y': 36
752     id: 27
753     legend:
754       avg: false
755       current: false
756       max: false
757       min: false
758       show: true
759       total: false
760       values: false
761     lines: true
762     linewidth: 1
763     links: []
764     nullPointMode: 'null'
765     options:
766       dataLinks: []
767     percentage: false
768     pointradius: 5
769     points: false
770     renderer: flot
771     seriesOverrides: []
772     spaceLength: 10
773     stack: false
774     steppedLine: false
775     targets:
776       - expr: >-
777           sum(mysql_info_schema_table_size{component="data_length",release="$release"})
778         format: time_series
779         intervalFactor: 1
780         legendFormat: Tables
781         refId: A
782       - expr: >-
783           sum(mysql_info_schema_table_size{component="index_length",release="$release"})
784         format: time_series
785         intervalFactor: 1
786         legendFormat: Indexes
787         refId: B
788     thresholds: []
789     timeFrom: null
790     timeRegions: []
791     timeShift: null
792     title: Disk usage tables / indexes
793     tooltip:
794       shared: true
795       sort: 0
796       value_type: individual
797     type: graph
798     xaxis:
799       buckets: null
800       mode: time
801       name: null
802       show: true
803       values: []
804     yaxes:
805       - format: decbytes
806         label: null
807         logBase: 1
808         max: null
809         min: null
810         show: true
811       - format: short
812         label: null
813         logBase: 1
814         max: null
815         min: null
816         show: true
817     yaxis:
818       align: false
819       alignLevel: null
820   - aliasColors: {}
821     bars: false
822     dashLength: 10
823     dashes: false
824     datasource: Prometheus
825     fill: 1
826     fillGradient: 0
827     gridPos:
828       h: 9
829       w: 12
830       x: 12
831       'y': 36
832     id: 7
833     legend:
834       avg: false
835       current: false
836       max: false
837       min: false
838       show: false
839       total: false
840       values: false
841     lines: true
842     linewidth: 1
843     links: []
844     nullPointMode: 'null'
845     options:
846       dataLinks: []
847     percentage: false
848     pointradius: 5
849     points: false
850     renderer: flot
851     seriesOverrides: []
852     spaceLength: 10
853     stack: false
854     steppedLine: false
855     targets:
856       - expr: 'sum(mysql_info_schema_table_rows{release="$release"})'
857         format: time_series
858         intervalFactor: 1
859         refId: A
860     thresholds: []
861     timeFrom: null
862     timeRegions: []
863     timeShift: null
864     title: Sum of all rows
865     tooltip:
866       shared: true
867       sort: 0
868       value_type: individual
869     type: graph
870     xaxis:
871       buckets: null
872       mode: time
873       name: null
874       show: true
875       values: []
876     yaxes:
877       - decimals: null
878         format: short
879         label: null
880         logBase: 1
881         max: null
882         min: null
883         show: true
884       - format: short
885         label: null
886         logBase: 1
887         max: null
888         min: null
889         show: true
890     yaxis:
891       align: false
892       alignLevel: null
893 schemaVersion: 19
894 style: dark
895 tags: []
896 templating:
897   list:
898     - allValue: null
899       current:
900         isNone: true
901         text: None
902         value: ''
903       datasource: Prometheus
904       definition: ''
905       hide: 0
906       includeAll: false
907       label: null
908       multi: false
909       name: release
910       options: []
911       query: 'label_values(mysql_up,release)'
912       refresh: 1
913       regex: ''
914       skipUrlSync: false
915       sort: 0
916       tagValuesQuery: ''
917       tags: []
918       tagsQuery: ''
919       type: query
920       useTags: false
921 time:
922   from: now-1h
923   to: now
924 timepicker:
925   refresh_intervals:
926     - 5s
927     - 10s
928     - 30s
929     - 1m
930     - 5m
931     - 15m
932     - 30m
933     - 1h
934     - 2h
935     - 1d
936   time_options:
937     - 5m
938     - 15m
939     - 1h
940     - 6h
941     - 12h
942     - 24h
943     - 2d
944     - 7d
945     - 30d
946 timezone: ''
947 title: Mysql
948 uid: 6-kPlS7ik
949 version: 1