Last active
April 4, 2023 14:57
-
-
Save croisillon/2057bea235e026b46225511a14219b9d to your computer and use it in GitHub Desktop.
Grafana dashboard for golang service in the Kubernetes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "annotations": { | |
| "list": [ | |
| { | |
| "builtIn": 1, | |
| "datasource": "-- Grafana --", | |
| "enable": true, | |
| "hide": true, | |
| "iconColor": "rgba(0, 211, 255, 1)", | |
| "name": "Annotations & Alerts", | |
| "type": "dashboard" | |
| } | |
| ] | |
| }, | |
| "description": "Метрики Golang сервиса в Kubernetes.", | |
| "editable": true, | |
| "gnetId": null, | |
| "graphTooltip": 1, | |
| "id": 152, | |
| "iteration": 1680618922737, | |
| "links": [], | |
| "panels": [ | |
| { | |
| "cacheTimeout": null, | |
| "colorBackground": false, | |
| "colorValue": false, | |
| "colors": [ | |
| "#299c46", | |
| "rgba(237, 129, 40, 0.89)", | |
| "#d44a3a" | |
| ], | |
| "datasource": null, | |
| "format": "none", | |
| "gauge": { | |
| "maxValue": 100, | |
| "minValue": 0, | |
| "show": false, | |
| "thresholdLabels": false, | |
| "thresholdMarkers": true | |
| }, | |
| "gridPos": { | |
| "h": 5, | |
| "w": 3, | |
| "x": 0, | |
| "y": 0 | |
| }, | |
| "id": 2, | |
| "interval": null, | |
| "links": [], | |
| "mappingType": 1, | |
| "mappingTypes": [ | |
| { | |
| "name": "value to text", | |
| "value": 1 | |
| }, | |
| { | |
| "name": "range to text", | |
| "value": 2 | |
| } | |
| ], | |
| "maxDataPoints": 100, | |
| "nullPointMode": "connected", | |
| "nullText": null, | |
| "pluginVersion": "6.7.1", | |
| "postfix": "", | |
| "postfixFontSize": "50%", | |
| "prefix": "", | |
| "prefixFontSize": "50%", | |
| "rangeMaps": [ | |
| { | |
| "from": "null", | |
| "text": "N/A", | |
| "to": "null" | |
| } | |
| ], | |
| "sparkline": { | |
| "fillColor": "rgba(31, 118, 189, 0.18)", | |
| "full": false, | |
| "lineColor": "rgb(31, 120, 193)", | |
| "show": false, | |
| "ymax": null, | |
| "ymin": null | |
| }, | |
| "tableColumn": "", | |
| "targets": [ | |
| { | |
| "expr": "go_info{pod=\"$pods_qry\"}", | |
| "instant": true, | |
| "interval": "", | |
| "legendFormat": "{{ version }}", | |
| "refId": "A" | |
| } | |
| ], | |
| "thresholds": "", | |
| "timeFrom": null, | |
| "timeShift": null, | |
| "title": "POD Go Version", | |
| "transparent": true, | |
| "type": "singlestat", | |
| "valueFontSize": "80%", | |
| "valueMaps": [ | |
| { | |
| "op": "=", | |
| "text": "N/A", | |
| "value": "null" | |
| } | |
| ], | |
| "valueName": "name" | |
| }, | |
| { | |
| "cacheTimeout": null, | |
| "colorBackground": false, | |
| "colorValue": false, | |
| "colors": [ | |
| "#299c46", | |
| "rgba(237, 129, 40, 0.89)", | |
| "#d44a3a" | |
| ], | |
| "datasource": null, | |
| "format": "s", | |
| "gauge": { | |
| "maxValue": 100, | |
| "minValue": 0, | |
| "show": false, | |
| "thresholdLabels": false, | |
| "thresholdMarkers": true | |
| }, | |
| "gridPos": { | |
| "h": 5, | |
| "w": 4, | |
| "x": 3, | |
| "y": 0 | |
| }, | |
| "id": 4, | |
| "interval": null, | |
| "links": [], | |
| "mappingType": 1, | |
| "mappingTypes": [ | |
| { | |
| "name": "value to text", | |
| "value": 1 | |
| }, | |
| { | |
| "name": "range to text", | |
| "value": 2 | |
| } | |
| ], | |
| "maxDataPoints": 100, | |
| "nullPointMode": "connected", | |
| "nullText": null, | |
| "postfix": "", | |
| "postfixFontSize": "50%", | |
| "prefix": "", | |
| "prefixFontSize": "50%", | |
| "rangeMaps": [ | |
| { | |
| "from": "null", | |
| "text": "N/A", | |
| "to": "null" | |
| } | |
| ], | |
| "sparkline": { | |
| "fillColor": "rgba(31, 118, 189, 0.18)", | |
| "full": false, | |
| "lineColor": "rgb(31, 120, 193)", | |
| "show": false, | |
| "ymax": null, | |
| "ymin": null | |
| }, | |
| "tableColumn": "", | |
| "targets": [ | |
| { | |
| "expr": "time() - process_start_time_seconds{pod=\"$pods_qry\"}", | |
| "instant": true, | |
| "interval": "", | |
| "legendFormat": "{{ instance }}", | |
| "refId": "A" | |
| } | |
| ], | |
| "thresholds": "", | |
| "timeFrom": null, | |
| "timeShift": null, | |
| "title": "POD Uptime", | |
| "transparent": true, | |
| "type": "singlestat", | |
| "valueFontSize": "80%", | |
| "valueMaps": [ | |
| { | |
| "op": "=", | |
| "text": "N/A", | |
| "value": "null" | |
| } | |
| ], | |
| "valueName": "current" | |
| }, | |
| { | |
| "cacheTimeout": null, | |
| "colorBackground": false, | |
| "colorValue": false, | |
| "colors": [ | |
| "#299c46", | |
| "rgba(237, 129, 40, 0.89)", | |
| "#d44a3a" | |
| ], | |
| "datasource": null, | |
| "decimals": 0, | |
| "format": "none", | |
| "gauge": { | |
| "maxValue": 100, | |
| "minValue": 0, | |
| "show": false, | |
| "thresholdLabels": false, | |
| "thresholdMarkers": true | |
| }, | |
| "gridPos": { | |
| "h": 5, | |
| "w": 3, | |
| "x": 7, | |
| "y": 0 | |
| }, | |
| "id": 6, | |
| "interval": null, | |
| "links": [], | |
| "mappingType": 1, | |
| "mappingTypes": [ | |
| { | |
| "name": "value to text", | |
| "value": 1 | |
| }, | |
| { | |
| "name": "range to text", | |
| "value": 2 | |
| } | |
| ], | |
| "maxDataPoints": 100, | |
| "nullPointMode": "connected", | |
| "nullText": null, | |
| "postfix": "", | |
| "postfixFontSize": "50%", | |
| "prefix": "", | |
| "prefixFontSize": "50%", | |
| "rangeMaps": [ | |
| { | |
| "from": "null", | |
| "text": "N/A", | |
| "to": "null" | |
| } | |
| ], | |
| "sparkline": { | |
| "fillColor": "rgba(31, 118, 189, 0.18)", | |
| "full": false, | |
| "lineColor": "#C4162A", | |
| "show": true, | |
| "ymax": null, | |
| "ymin": null | |
| }, | |
| "tableColumn": "", | |
| "targets": [ | |
| { | |
| "expr": "resets((time() - sum(process_start_time_seconds{pod=\"$pods_qry\"}))[5m:10s])", | |
| "interval": "", | |
| "legendFormat": "", | |
| "refId": "A" | |
| } | |
| ], | |
| "thresholds": "", | |
| "timeFrom": null, | |
| "timeShift": null, | |
| "title": "POD Restarts", | |
| "transparent": true, | |
| "type": "singlestat", | |
| "valueFontSize": "80%", | |
| "valueMaps": [ | |
| { | |
| "op": "=", | |
| "text": "N/A", | |
| "value": "null" | |
| } | |
| ], | |
| "valueName": "delta" | |
| }, | |
| { | |
| "cacheTimeout": null, | |
| "datasource": null, | |
| "gridPos": { | |
| "h": 5, | |
| "w": 4, | |
| "x": 10, | |
| "y": 0 | |
| }, | |
| "id": 8, | |
| "links": [], | |
| "options": { | |
| "fieldOptions": { | |
| "calcs": [ | |
| "lastNotNull" | |
| ], | |
| "defaults": { | |
| "mappings": [ | |
| { | |
| "id": 0, | |
| "op": "=", | |
| "text": "N/A", | |
| "type": 1, | |
| "value": "null" | |
| } | |
| ], | |
| "nullValueMode": "connected", | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "#299c46", | |
| "value": null | |
| }, | |
| { | |
| "color": "rgba(237, 129, 40, 0.89)", | |
| "value": 80 | |
| }, | |
| { | |
| "color": "#d44a3a", | |
| "value": 95 | |
| } | |
| ] | |
| }, | |
| "unit": "percent" | |
| }, | |
| "overrides": [], | |
| "values": false | |
| }, | |
| "orientation": "horizontal", | |
| "showThresholdLabels": false, | |
| "showThresholdMarkers": true | |
| }, | |
| "pluginVersion": "6.7.1", | |
| "targets": [ | |
| { | |
| "expr": "100 * (sum (rate(container_cpu_usage_seconds_total{pod=~\"$pods_qry.*\", image!=\"\"}[5m])) by (pod) / on() sum (kube_pod_container_resource_limits{pod=~\"$pods_qry.*\", resource=\"cpu\"}) by (pod))", | |
| "interval": "", | |
| "intervalFactor": 2, | |
| "legendFormat": "", | |
| "refId": "A" | |
| } | |
| ], | |
| "timeFrom": null, | |
| "timeShift": null, | |
| "title": "POD CPU Usage", | |
| "transparent": true, | |
| "type": "gauge" | |
| }, | |
| { | |
| "cacheTimeout": null, | |
| "datasource": null, | |
| "gridPos": { | |
| "h": 5, | |
| "w": 4, | |
| "x": 14, | |
| "y": 0 | |
| }, | |
| "id": 10, | |
| "links": [], | |
| "options": { | |
| "fieldOptions": { | |
| "calcs": [ | |
| "lastNotNull" | |
| ], | |
| "defaults": { | |
| "mappings": [ | |
| { | |
| "id": 0, | |
| "op": "=", | |
| "text": "N/A", | |
| "type": 1, | |
| "value": "null" | |
| } | |
| ], | |
| "nullValueMode": "connected", | |
| "thresholds": { | |
| "mode": "absolute", | |
| "steps": [ | |
| { | |
| "color": "#299c46", | |
| "value": null | |
| }, | |
| { | |
| "color": "rgba(237, 129, 40, 0.89)", | |
| "value": 80 | |
| }, | |
| { | |
| "color": "#d44a3a", | |
| "value": 95 | |
| } | |
| ] | |
| }, | |
| "unit": "percent" | |
| }, | |
| "overrides": [], | |
| "values": false | |
| }, | |
| "orientation": "horizontal", | |
| "showThresholdLabels": false, | |
| "showThresholdMarkers": true | |
| }, | |
| "pluginVersion": "6.7.1", | |
| "targets": [ | |
| { | |
| "expr": "100 * (sum(container_memory_working_set_bytes{pod=~\"$pods_qry.*\", image!=\"\"}) by (pod) / on() sum(kube_pod_container_resource_limits{pod=~\"$pods_qry.*\", resource=\"memory\"}) by (pod))", | |
| "interval": "", | |
| "intervalFactor": 2, | |
| "legendFormat": "", | |
| "refId": "A" | |
| } | |
| ], | |
| "timeFrom": null, | |
| "timeShift": null, | |
| "title": "POD Memory Usage", | |
| "transparent": true, | |
| "type": "gauge" | |
| }, | |
| { | |
| "cacheTimeout": null, | |
| "colorBackground": false, | |
| "colorValue": false, | |
| "colors": [ | |
| "#299c46", | |
| "rgba(237, 129, 40, 0.89)", | |
| "#d44a3a" | |
| ], | |
| "datasource": null, | |
| "description": "Размер виртуальной памяти (байт) — это объем адресного пространства, которым управляет процесс. Сюда входят все типы памяти, как в ОЗУ, так и в выгруженном состоянии.", | |
| "format": "bytes", | |
| "gauge": { | |
| "maxValue": 100, | |
| "minValue": 0, | |
| "show": false, | |
| "thresholdLabels": false, | |
| "thresholdMarkers": true | |
| }, | |
| "gridPos": { | |
| "h": 5, | |
| "w": 3, | |
| "x": 18, | |
| "y": 0 | |
| }, | |
| "id": 32, | |
| "interval": null, | |
| "links": [], | |
| "mappingType": 1, | |
| "mappingTypes": [ | |
| { | |
| "name": "value to text", | |
| "value": 1 | |
| }, | |
| { | |
| "name": "range to text", | |
| "value": 2 | |
| } | |
| ], | |
| "maxDataPoints": 100, | |
| "nullPointMode": "connected", | |
| "nullText": null, | |
| "pluginVersion": "6.7.1", | |
| "postfix": "", | |
| "postfixFontSize": "50%", | |
| "prefix": "", | |
| "prefixFontSize": "50%", | |
| "rangeMaps": [ | |
| { | |
| "from": "null", | |
| "text": "N/A", | |
| "to": "null" | |
| } | |
| ], | |
| "sparkline": { | |
| "fillColor": "rgba(31, 118, 189, 0.18)", | |
| "full": false, | |
| "lineColor": "rgb(31, 120, 193)", | |
| "show": true, | |
| "ymax": null, | |
| "ymin": null | |
| }, | |
| "tableColumn": "", | |
| "targets": [ | |
| { | |
| "expr": "process_virtual_memory_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Размер виртуальной памяти (в байтах).", | |
| "refId": "A" | |
| } | |
| ], | |
| "thresholds": "", | |
| "timeFrom": null, | |
| "timeShift": null, | |
| "title": "Process Virtual Memory (vsize)", | |
| "transparent": true, | |
| "type": "singlestat", | |
| "valueFontSize": "80%", | |
| "valueMaps": [ | |
| { | |
| "op": "=", | |
| "text": "N/A", | |
| "value": "null" | |
| } | |
| ], | |
| "valueName": "current" | |
| }, | |
| { | |
| "cacheTimeout": null, | |
| "colorBackground": false, | |
| "colorValue": false, | |
| "colors": [ | |
| "#299c46", | |
| "rgba(237, 129, 40, 0.89)", | |
| "#d44a3a" | |
| ], | |
| "datasource": null, | |
| "description": "Размер резидентной памяти (байт) — количество страниц памяти, которые процесс имеет в реальной памяти, с размером страницы. Отображает объем памяти, который принадлежит конкретно этому процессу в байтах. Это исключает выгруженные страницы памяти.", | |
| "format": "bytes", | |
| "gauge": { | |
| "maxValue": 100, | |
| "minValue": 0, | |
| "show": false, | |
| "thresholdLabels": false, | |
| "thresholdMarkers": true | |
| }, | |
| "gridPos": { | |
| "h": 5, | |
| "w": 3, | |
| "x": 21, | |
| "y": 0 | |
| }, | |
| "id": 34, | |
| "interval": null, | |
| "links": [], | |
| "mappingType": 1, | |
| "mappingTypes": [ | |
| { | |
| "name": "value to text", | |
| "value": 1 | |
| }, | |
| { | |
| "name": "range to text", | |
| "value": 2 | |
| } | |
| ], | |
| "maxDataPoints": 100, | |
| "nullPointMode": "connected", | |
| "nullText": null, | |
| "pluginVersion": "6.7.1", | |
| "postfix": "", | |
| "postfixFontSize": "50%", | |
| "prefix": "", | |
| "prefixFontSize": "50%", | |
| "rangeMaps": [ | |
| { | |
| "from": "null", | |
| "text": "N/A", | |
| "to": "null" | |
| } | |
| ], | |
| "sparkline": { | |
| "fillColor": "rgba(31, 118, 189, 0.18)", | |
| "full": false, | |
| "lineColor": "rgb(31, 120, 193)", | |
| "show": true, | |
| "ymax": null, | |
| "ymin": null | |
| }, | |
| "tableColumn": "", | |
| "targets": [ | |
| { | |
| "expr": "process_resident_memory_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Размер резидентной памяти (в байтах)", | |
| "refId": "A" | |
| } | |
| ], | |
| "thresholds": "", | |
| "timeFrom": null, | |
| "timeShift": null, | |
| "title": "Process Resident Memory (RSS)", | |
| "type": "singlestat", | |
| "valueFontSize": "80%", | |
| "valueMaps": [ | |
| { | |
| "op": "=", | |
| "text": "N/A", | |
| "value": "null" | |
| } | |
| ], | |
| "valueName": "current" | |
| }, | |
| { | |
| "aliasColors": {}, | |
| "bars": false, | |
| "dashLength": 10, | |
| "dashes": false, | |
| "datasource": null, | |
| "fill": 1, | |
| "fillGradient": 0, | |
| "gridPos": { | |
| "h": 10, | |
| "w": 12, | |
| "x": 0, | |
| "y": 5 | |
| }, | |
| "hiddenSeries": false, | |
| "id": 12, | |
| "legend": { | |
| "avg": false, | |
| "current": false, | |
| "max": false, | |
| "min": false, | |
| "show": true, | |
| "total": false, | |
| "values": false | |
| }, | |
| "lines": true, | |
| "linewidth": 1, | |
| "nullPointMode": "null", | |
| "options": { | |
| "dataLinks": [] | |
| }, | |
| "percentage": false, | |
| "pointradius": 2, | |
| "points": false, | |
| "renderer": "flot", | |
| "seriesOverrides": [], | |
| "spaceLength": 10, | |
| "stack": false, | |
| "steppedLine": false, | |
| "targets": [ | |
| { | |
| "expr": "go_memstats_mspan_inuse_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт, используемых структурами mspan", | |
| "refId": "A" | |
| }, | |
| { | |
| "expr": "go_memstats_mspan_sys_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт, используемых для структур mspan, полученных из system.", | |
| "refId": "B" | |
| }, | |
| { | |
| "expr": "go_memstats_mcache_inuse_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт, используемых структурами mcache", | |
| "refId": "C" | |
| }, | |
| { | |
| "expr": "go_memstats_mcache_sys_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт, используемых для структур mcache, полученных из system.", | |
| "refId": "D" | |
| }, | |
| { | |
| "expr": "go_memstats_buck_hash_sys_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт, используемых хеш-таблицей сегмента профилирования.", | |
| "refId": "E" | |
| }, | |
| { | |
| "expr": "go_memstats_gc_sys_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт, используемых для метаданных системы \"сборки мусора\"", | |
| "refId": "F" | |
| }, | |
| { | |
| "expr": "go_memstats_other_sys_bytes{pod=\"$pods_qry\"} - go_memstats_other_sys_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт, используемых для других системных распределений.", | |
| "refId": "G" | |
| }, | |
| { | |
| "expr": "go_memstats_next_gc_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт кучи (heap bytes), когда будет произведена следующая \"сборка мусора\".", | |
| "refId": "H" | |
| } | |
| ], | |
| "thresholds": [], | |
| "timeFrom": null, | |
| "timeRegions": [], | |
| "timeShift": null, | |
| "title": "Memory in Off-Heap", | |
| "tooltip": { | |
| "shared": true, | |
| "sort": 0, | |
| "value_type": "individual" | |
| }, | |
| "type": "graph", | |
| "xaxis": { | |
| "buckets": null, | |
| "mode": "time", | |
| "name": null, | |
| "show": true, | |
| "values": [] | |
| }, | |
| "yaxes": [ | |
| { | |
| "format": "decbytes", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| }, | |
| { | |
| "format": "short", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": false | |
| } | |
| ], | |
| "yaxis": { | |
| "align": false, | |
| "alignLevel": null | |
| } | |
| }, | |
| { | |
| "aliasColors": {}, | |
| "bars": false, | |
| "dashLength": 10, | |
| "dashes": false, | |
| "datasource": null, | |
| "fill": 1, | |
| "fillGradient": 0, | |
| "gridPos": { | |
| "h": 10, | |
| "w": 12, | |
| "x": 12, | |
| "y": 5 | |
| }, | |
| "hiddenSeries": false, | |
| "id": 14, | |
| "legend": { | |
| "avg": false, | |
| "current": false, | |
| "max": false, | |
| "min": false, | |
| "show": true, | |
| "total": false, | |
| "values": false | |
| }, | |
| "lines": true, | |
| "linewidth": 1, | |
| "nullPointMode": "null", | |
| "options": { | |
| "dataLinks": [] | |
| }, | |
| "percentage": false, | |
| "pointradius": 2, | |
| "points": false, | |
| "renderer": "flot", | |
| "seriesOverrides": [], | |
| "spaceLength": 10, | |
| "stack": false, | |
| "steppedLine": false, | |
| "targets": [ | |
| { | |
| "expr": "go_memstats_heap_alloc_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт динамической памяти (heap bytes), выделенных и все еще используемых.", | |
| "refId": "A" | |
| }, | |
| { | |
| "expr": "go_memstats_heap_sys_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": " Количество байт динамической памяти (heap bytes), полученных от системы.", | |
| "refId": "B" | |
| }, | |
| { | |
| "expr": "go_memstats_heap_idle_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт динамической памяти (heap bytes), ожидающих использования.", | |
| "refId": "C" | |
| }, | |
| { | |
| "expr": "go_memstats_heap_inuse_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество используемых байт динамической памяти (heap bytes).", | |
| "refId": "D" | |
| }, | |
| { | |
| "expr": "go_memstats_heap_released_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт динамической памяти (heap bytes), выпущенных для ОС.", | |
| "refId": "E" | |
| } | |
| ], | |
| "thresholds": [], | |
| "timeFrom": null, | |
| "timeRegions": [], | |
| "timeShift": null, | |
| "title": "Memory in Heap", | |
| "tooltip": { | |
| "shared": true, | |
| "sort": 0, | |
| "value_type": "individual" | |
| }, | |
| "type": "graph", | |
| "xaxis": { | |
| "buckets": null, | |
| "mode": "time", | |
| "name": null, | |
| "show": true, | |
| "values": [] | |
| }, | |
| "yaxes": [ | |
| { | |
| "format": "decbytes", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| }, | |
| { | |
| "format": "short", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| } | |
| ], | |
| "yaxis": { | |
| "align": false, | |
| "alignLevel": null | |
| } | |
| }, | |
| { | |
| "aliasColors": {}, | |
| "bars": false, | |
| "dashLength": 10, | |
| "dashes": false, | |
| "datasource": null, | |
| "fill": 1, | |
| "fillGradient": 0, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 0, | |
| "y": 15 | |
| }, | |
| "hiddenSeries": false, | |
| "id": 16, | |
| "legend": { | |
| "avg": false, | |
| "current": false, | |
| "max": false, | |
| "min": false, | |
| "show": true, | |
| "total": false, | |
| "values": false | |
| }, | |
| "lines": true, | |
| "linewidth": 1, | |
| "nullPointMode": "null", | |
| "options": { | |
| "dataLinks": [] | |
| }, | |
| "percentage": false, | |
| "pointradius": 2, | |
| "points": false, | |
| "renderer": "flot", | |
| "seriesOverrides": [], | |
| "spaceLength": 10, | |
| "stack": false, | |
| "steppedLine": false, | |
| "targets": [ | |
| { | |
| "expr": "go_memstats_stack_inuse_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт, используемых распределителем стека (stack allocator).", | |
| "refId": "A" | |
| }, | |
| { | |
| "expr": "go_memstats_stack_sys_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт, полученных от системы для распределителя стека (stack allocator).", | |
| "refId": "B" | |
| } | |
| ], | |
| "thresholds": [], | |
| "timeFrom": null, | |
| "timeRegions": [], | |
| "timeShift": null, | |
| "title": "Memory in Stack", | |
| "tooltip": { | |
| "shared": true, | |
| "sort": 0, | |
| "value_type": "individual" | |
| }, | |
| "type": "graph", | |
| "xaxis": { | |
| "buckets": null, | |
| "mode": "time", | |
| "name": null, | |
| "show": true, | |
| "values": [] | |
| }, | |
| "yaxes": [ | |
| { | |
| "format": "decbytes", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| }, | |
| { | |
| "format": "short", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| } | |
| ], | |
| "yaxis": { | |
| "align": false, | |
| "alignLevel": null | |
| } | |
| }, | |
| { | |
| "aliasColors": {}, | |
| "bars": false, | |
| "dashLength": 10, | |
| "dashes": false, | |
| "datasource": null, | |
| "fill": 1, | |
| "fillGradient": 0, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 12, | |
| "y": 15 | |
| }, | |
| "hiddenSeries": false, | |
| "id": 18, | |
| "legend": { | |
| "avg": false, | |
| "current": false, | |
| "max": false, | |
| "min": false, | |
| "show": true, | |
| "total": false, | |
| "values": false | |
| }, | |
| "lines": true, | |
| "linewidth": 1, | |
| "nullPointMode": "null", | |
| "options": { | |
| "dataLinks": [] | |
| }, | |
| "percentage": false, | |
| "pointradius": 2, | |
| "points": false, | |
| "renderer": "flot", | |
| "seriesOverrides": [], | |
| "spaceLength": 10, | |
| "stack": false, | |
| "steppedLine": false, | |
| "targets": [ | |
| { | |
| "expr": "go_memstats_sys_bytes{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество байт, полученных от системы.", | |
| "refId": "A" | |
| } | |
| ], | |
| "thresholds": [], | |
| "timeFrom": null, | |
| "timeRegions": [], | |
| "timeShift": null, | |
| "title": "Total Used Memory", | |
| "tooltip": { | |
| "shared": true, | |
| "sort": 0, | |
| "value_type": "individual" | |
| }, | |
| "type": "graph", | |
| "xaxis": { | |
| "buckets": null, | |
| "mode": "time", | |
| "name": null, | |
| "show": true, | |
| "values": [] | |
| }, | |
| "yaxes": [ | |
| { | |
| "format": "bytes", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| }, | |
| { | |
| "format": "short", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| } | |
| ], | |
| "yaxis": { | |
| "align": false, | |
| "alignLevel": null | |
| } | |
| }, | |
| { | |
| "aliasColors": {}, | |
| "bars": false, | |
| "dashLength": 10, | |
| "dashes": false, | |
| "datasource": null, | |
| "description": "", | |
| "fill": 1, | |
| "fillGradient": 0, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 0, | |
| "y": 23 | |
| }, | |
| "hiddenSeries": false, | |
| "id": 20, | |
| "legend": { | |
| "avg": false, | |
| "current": false, | |
| "max": false, | |
| "min": false, | |
| "show": true, | |
| "total": false, | |
| "values": false | |
| }, | |
| "lines": true, | |
| "linewidth": 1, | |
| "nullPointMode": "null", | |
| "options": { | |
| "dataLinks": [] | |
| }, | |
| "percentage": false, | |
| "pointradius": 2, | |
| "points": false, | |
| "renderer": "flot", | |
| "seriesOverrides": [], | |
| "spaceLength": 10, | |
| "stack": false, | |
| "steppedLine": false, | |
| "targets": [ | |
| { | |
| "expr": "go_memstats_mallocs_total{pod=\"$pods_qry\"} - go_memstats_frees_total{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "intervalFactor": 1, | |
| "legendFormat": "Количество \"живых\" объектов", | |
| "refId": "A" | |
| } | |
| ], | |
| "thresholds": [], | |
| "timeFrom": null, | |
| "timeRegions": [], | |
| "timeShift": null, | |
| "title": "Number of Live Objects", | |
| "tooltip": { | |
| "shared": true, | |
| "sort": 0, | |
| "value_type": "individual" | |
| }, | |
| "type": "graph", | |
| "xaxis": { | |
| "buckets": null, | |
| "mode": "time", | |
| "name": null, | |
| "show": true, | |
| "values": [] | |
| }, | |
| "yaxes": [ | |
| { | |
| "format": "short", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| }, | |
| { | |
| "format": "short", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": false | |
| } | |
| ], | |
| "yaxis": { | |
| "align": false, | |
| "alignLevel": null | |
| } | |
| }, | |
| { | |
| "aliasColors": {}, | |
| "bars": false, | |
| "cacheTimeout": null, | |
| "dashLength": 10, | |
| "dashes": false, | |
| "datasource": null, | |
| "description": "", | |
| "fill": 1, | |
| "fillGradient": 0, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 12, | |
| "y": 23 | |
| }, | |
| "hiddenSeries": false, | |
| "id": 22, | |
| "legend": { | |
| "avg": false, | |
| "current": false, | |
| "max": false, | |
| "min": false, | |
| "show": true, | |
| "total": false, | |
| "values": false | |
| }, | |
| "lines": true, | |
| "linewidth": 1, | |
| "links": [], | |
| "nullPointMode": "null", | |
| "options": { | |
| "dataLinks": [] | |
| }, | |
| "percentage": false, | |
| "pluginVersion": "6.7.1", | |
| "pointradius": 2, | |
| "points": false, | |
| "renderer": "flot", | |
| "seriesOverrides": [], | |
| "spaceLength": 10, | |
| "stack": false, | |
| "steppedLine": false, | |
| "targets": [ | |
| { | |
| "expr": "go_goroutines{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Количество существующих в данный момент горутин", | |
| "refId": "A" | |
| } | |
| ], | |
| "thresholds": [], | |
| "timeFrom": null, | |
| "timeRegions": [], | |
| "timeShift": null, | |
| "title": "Goroutines", | |
| "tooltip": { | |
| "shared": true, | |
| "sort": 0, | |
| "value_type": "individual" | |
| }, | |
| "type": "graph", | |
| "xaxis": { | |
| "buckets": null, | |
| "mode": "time", | |
| "name": null, | |
| "show": true, | |
| "values": [] | |
| }, | |
| "yaxes": [ | |
| { | |
| "format": "short", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| }, | |
| { | |
| "format": "short", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| } | |
| ], | |
| "yaxis": { | |
| "align": false, | |
| "alignLevel": null | |
| } | |
| }, | |
| { | |
| "aliasColors": {}, | |
| "bars": false, | |
| "dashLength": 10, | |
| "dashes": false, | |
| "datasource": null, | |
| "description": "Показывает количество разыменований указателя", | |
| "fill": 1, | |
| "fillGradient": 0, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 0, | |
| "y": 31 | |
| }, | |
| "hiddenSeries": false, | |
| "id": 24, | |
| "legend": { | |
| "avg": false, | |
| "current": false, | |
| "max": false, | |
| "min": false, | |
| "show": true, | |
| "total": false, | |
| "values": false | |
| }, | |
| "lines": true, | |
| "linewidth": 1, | |
| "nullPointMode": "null", | |
| "options": { | |
| "dataLinks": [] | |
| }, | |
| "percentage": false, | |
| "pointradius": 2, | |
| "points": false, | |
| "renderer": "flot", | |
| "seriesOverrides": [], | |
| "spaceLength": 10, | |
| "stack": false, | |
| "steppedLine": false, | |
| "targets": [ | |
| { | |
| "expr": "rate(go_memstats_lookups_total{pod=\"$pods_qry\"}[10m])", | |
| "interval": "", | |
| "legendFormat": "Общее количество операций поиска указателя", | |
| "refId": "A" | |
| } | |
| ], | |
| "thresholds": [], | |
| "timeFrom": null, | |
| "timeRegions": [], | |
| "timeShift": null, | |
| "title": "Rate of a Pointer Dereferences", | |
| "tooltip": { | |
| "shared": true, | |
| "sort": 0, | |
| "value_type": "individual" | |
| }, | |
| "type": "graph", | |
| "xaxis": { | |
| "buckets": null, | |
| "mode": "time", | |
| "name": null, | |
| "show": true, | |
| "values": [] | |
| }, | |
| "yaxes": [ | |
| { | |
| "format": "ops", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| }, | |
| { | |
| "format": "short", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| } | |
| ], | |
| "yaxis": { | |
| "align": false, | |
| "alignLevel": null | |
| } | |
| }, | |
| { | |
| "aliasColors": {}, | |
| "bars": false, | |
| "dashLength": 10, | |
| "dashes": false, | |
| "datasource": null, | |
| "description": "Сводная информация (summary) о продолжительности паузы в циклах \"сборки мусора\" (освобождение памяти от ненужных, устаревших, неверных или разрушенных данных).", | |
| "fill": 1, | |
| "fillGradient": 0, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 12, | |
| "y": 31 | |
| }, | |
| "hiddenSeries": false, | |
| "id": 26, | |
| "legend": { | |
| "avg": false, | |
| "current": false, | |
| "max": false, | |
| "min": false, | |
| "show": true, | |
| "total": false, | |
| "values": false | |
| }, | |
| "lines": true, | |
| "linewidth": 1, | |
| "nullPointMode": "null", | |
| "options": { | |
| "dataLinks": [] | |
| }, | |
| "percentage": false, | |
| "pointradius": 2, | |
| "points": false, | |
| "renderer": "flot", | |
| "seriesOverrides": [], | |
| "spaceLength": 10, | |
| "stack": false, | |
| "steppedLine": false, | |
| "targets": [ | |
| { | |
| "expr": "go_gc_duration_seconds{pod=\"$pods_qry\"}", | |
| "interval": "", | |
| "legendFormat": "Продолжительность паузы в цикле сборки мусора - {{ quantile }}", | |
| "refId": "A" | |
| } | |
| ], | |
| "thresholds": [], | |
| "timeFrom": null, | |
| "timeRegions": [], | |
| "timeShift": null, | |
| "title": "GC duration quantile", | |
| "tooltip": { | |
| "shared": true, | |
| "sort": 0, | |
| "value_type": "individual" | |
| }, | |
| "type": "graph", | |
| "xaxis": { | |
| "buckets": null, | |
| "mode": "time", | |
| "name": null, | |
| "show": true, | |
| "values": [] | |
| }, | |
| "yaxes": [ | |
| { | |
| "format": "s", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| }, | |
| { | |
| "format": "short", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| } | |
| ], | |
| "yaxis": { | |
| "align": false, | |
| "alignLevel": null | |
| } | |
| }, | |
| { | |
| "aliasColors": {}, | |
| "bars": false, | |
| "dashLength": 10, | |
| "dashes": false, | |
| "datasource": null, | |
| "description": "Сколько байт/сек памяти потребляет приложение и является \"долговечным\" при перезагрузках и промахах при сканировании", | |
| "fill": 1, | |
| "fillGradient": 0, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 0, | |
| "y": 39 | |
| }, | |
| "hiddenSeries": false, | |
| "id": 28, | |
| "legend": { | |
| "avg": false, | |
| "current": false, | |
| "max": false, | |
| "min": false, | |
| "show": true, | |
| "total": false, | |
| "values": false | |
| }, | |
| "lines": true, | |
| "linewidth": 1, | |
| "nullPointMode": "null", | |
| "options": { | |
| "dataLinks": [] | |
| }, | |
| "percentage": false, | |
| "pointradius": 2, | |
| "points": false, | |
| "renderer": "flot", | |
| "seriesOverrides": [], | |
| "spaceLength": 10, | |
| "stack": false, | |
| "steppedLine": false, | |
| "targets": [ | |
| { | |
| "expr": "rate(go_memstats_alloc_bytes_total{pod=~\"^($pods_qry)$\"}[10m])", | |
| "format": "time_series", | |
| "interval": "", | |
| "intervalFactor": 1, | |
| "legendFormat": "Общее количество выделенных байт, даже если они освобождены.", | |
| "refId": "A" | |
| } | |
| ], | |
| "thresholds": [], | |
| "timeFrom": null, | |
| "timeRegions": [], | |
| "timeShift": null, | |
| "title": "Rates of Allocation", | |
| "tooltip": { | |
| "shared": true, | |
| "sort": 0, | |
| "value_type": "individual" | |
| }, | |
| "type": "graph", | |
| "xaxis": { | |
| "buckets": null, | |
| "mode": "time", | |
| "name": null, | |
| "show": true, | |
| "values": [] | |
| }, | |
| "yaxes": [ | |
| { | |
| "format": "decbytes", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| }, | |
| { | |
| "format": "short", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| } | |
| ], | |
| "yaxis": { | |
| "align": false, | |
| "alignLevel": null | |
| } | |
| }, | |
| { | |
| "aliasColors": {}, | |
| "bars": false, | |
| "dashLength": 10, | |
| "dashes": false, | |
| "datasource": null, | |
| "description": "Показывает, сколько объектов кучи выделено.", | |
| "fill": 1, | |
| "fillGradient": 0, | |
| "gridPos": { | |
| "h": 8, | |
| "w": 12, | |
| "x": 12, | |
| "y": 39 | |
| }, | |
| "hiddenSeries": false, | |
| "id": 30, | |
| "legend": { | |
| "avg": false, | |
| "current": false, | |
| "max": false, | |
| "min": false, | |
| "show": true, | |
| "total": false, | |
| "values": false | |
| }, | |
| "lines": true, | |
| "linewidth": 1, | |
| "nullPointMode": "null", | |
| "options": { | |
| "dataLinks": [] | |
| }, | |
| "percentage": false, | |
| "pointradius": 2, | |
| "points": false, | |
| "renderer": "flot", | |
| "seriesOverrides": [], | |
| "spaceLength": 10, | |
| "stack": false, | |
| "steppedLine": false, | |
| "targets": [ | |
| { | |
| "expr": "rate(go_memstats_mallocs_total{pod=\"$pods_qry\"}[10m])", | |
| "interval": "", | |
| "legendFormat": "Общее количество выделений памяти (mallocs)", | |
| "refId": "A" | |
| } | |
| ], | |
| "thresholds": [], | |
| "timeFrom": null, | |
| "timeRegions": [], | |
| "timeShift": null, | |
| "title": "Rate of Objects Allocated", | |
| "tooltip": { | |
| "shared": true, | |
| "sort": 0, | |
| "value_type": "individual" | |
| }, | |
| "type": "graph", | |
| "xaxis": { | |
| "buckets": null, | |
| "mode": "time", | |
| "name": null, | |
| "show": true, | |
| "values": [] | |
| }, | |
| "yaxes": [ | |
| { | |
| "format": "short", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| }, | |
| { | |
| "format": "short", | |
| "label": null, | |
| "logBase": 1, | |
| "max": null, | |
| "min": null, | |
| "show": true | |
| } | |
| ], | |
| "yaxis": { | |
| "align": false, | |
| "alignLevel": null | |
| } | |
| } | |
| ], | |
| "refresh": false, | |
| "schemaVersion": 22, | |
| "style": "dark", | |
| "tags": [ | |
| "go", | |
| "golang", | |
| "kubernetes", | |
| "k8s" | |
| ], | |
| "templating": { | |
| "list": [ | |
| { | |
| "current": { | |
| "selected": true, | |
| "text": "Prometheus", | |
| "value": "Prometheus" | |
| }, | |
| "hide": 2, | |
| "includeAll": false, | |
| "label": "Metrics datasource", | |
| "multi": false, | |
| "name": "datasource", | |
| "options": [], | |
| "query": "prometheus", | |
| "refresh": 1, | |
| "regex": "Prometheus", | |
| "skipUrlSync": false, | |
| "type": "datasource" | |
| }, | |
| { | |
| "current": { | |
| "selected": true, | |
| "text": "service", | |
| "value": "service" | |
| }, | |
| "hide": 2, | |
| "label": null, | |
| "name": "app", | |
| "options": [ | |
| { | |
| "selected": true, | |
| "text": "service", | |
| "value": "service" | |
| } | |
| ], | |
| "query": "service", | |
| "skipUrlSync": false, | |
| "type": "constant" | |
| }, | |
| { | |
| "current": { | |
| "selected": true, | |
| "text": "intercom", | |
| "value": "intercom" | |
| }, | |
| "hide": 2, | |
| "label": null, | |
| "name": "namespace", | |
| "options": [ | |
| { | |
| "selected": true, | |
| "text": "intercom", | |
| "value": "intercom" | |
| } | |
| ], | |
| "query": "intercom", | |
| "skipUrlSync": false, | |
| "type": "constant" | |
| }, | |
| { | |
| "allValue": null, | |
| "current": { | |
| "text": "service-new-7ffd54594b-q95v9", | |
| "value": "service-new-7ffd54594b-q95v9" | |
| }, | |
| "datasource": "$datasource", | |
| "definition": "label_values(go_info{namespace=\"$namespace\", app=\"$app\"}, pod) ", | |
| "hide": 0, | |
| "includeAll": false, | |
| "index": -1, | |
| "label": "POD", | |
| "multi": false, | |
| "name": "pods_qry", | |
| "options": [], | |
| "query": "label_values(go_info{namespace=\"$namespace\", app=\"$app\"}, pod) ", | |
| "refresh": 2, | |
| "regex": "", | |
| "skipUrlSync": false, | |
| "sort": 0, | |
| "tagValuesQuery": "", | |
| "tags": [], | |
| "tagsQuery": "", | |
| "type": "query", | |
| "useTags": false | |
| } | |
| ] | |
| }, | |
| "time": { | |
| "from": "now-1h", | |
| "to": "now-1m" | |
| }, | |
| "timepicker": { | |
| "nowDelay": "1m", | |
| "refresh_intervals": [ | |
| "5s", | |
| "10s", | |
| "30s", | |
| "1m", | |
| "5m", | |
| "15m", | |
| "30m" | |
| ] | |
| }, | |
| "timezone": "", | |
| "title": "Kubernetes :: Golang metrics", | |
| "uid": "J5JPvHLVk", | |
| "variables": { | |
| "list": [] | |
| }, | |
| "version": 36 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment