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