diff --git a/NGINX Monitoring-ingress.json b/NGINX Monitoring-ingress.json new file mode 100644 index 0000000..3cca689 --- /dev/null +++ b/NGINX Monitoring-ingress.json @@ -0,0 +1,587 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 31, + "links": [], + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "direction": "backward", + "editorMode": "code", + "expr": "count_over_time({job=\"$job\"} [1m])", + "queryType": "range", + "refId": "A" + } + ], + "title": "Requests per Minute", + "type": "timeseries" + }, + { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 8 + }, + "id": 11, + "options": { + "dedupStrategy": "none", + "enableInfiniteScrolling": false, + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "expr": "{job=\"$job\"} |= \"error\"", + "refId": "K" + } + ], + "title": "Latest NGINX Errors", + "type": "logs" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 14 + }, + "id": 17, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "direction": "backward", + "editorMode": "code", + "expr": "sum(\r\n count_over_time(\r\n {job=\"$job\"}\r\n | pattern \" - - [] \\\" \\\" \\\"\\\" \\\"\\\" [] [] \"\r\n | status=~\"4..\"\r\n [1m]\r\n )\r\n)", + "legendFormat": "Errors 4**", + "queryType": "range", + "refId": "A" + } + ], + "title": "4xx errors per minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 14 + }, + "id": 4, + "options": { + "dedupStrategy": "none", + "enableInfiniteScrolling": false, + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "direction": "backward", + "editorMode": "code", + "expr": "{job=\"$job\"}\r\n| pattern \" - - [] \\\" \\\" \\\"\\\" \\\"\\\" [] [] \"\r\n| status=~\"4..\"\r\n| line_format \"{{.status}} {{.method}} {{.path}} time={{.req_time}}\"\r\n", + "legendFormat": "", + "queryType": "range", + "refId": "D" + } + ], + "title": "4xx Responses ", + "type": "logs" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 16, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "direction": "backward", + "editorMode": "code", + "expr": "sum(\r\n count_over_time(\r\n {job=\"$job\"}\r\n | pattern \" - - [] \\\" \\\" \\\"\\\" \\\"\\\" [] [] \"\r\n | status=~\"5..\"\r\n [1m]\r\n )\r\n)", + "legendFormat": "Errors 5**", + "queryType": "range", + "refId": "A" + } + ], + "title": "5xx errors per minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 5, + "options": { + "dedupStrategy": "none", + "enableInfiniteScrolling": false, + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": false, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "direction": "backward", + "editorMode": "code", + "expr": "{job=\"$job\"}\r\n| pattern \" - - [] \\\" \\\" \\\"\\\" \\\"\\\" [] [] \"\r\n| status=~\"5..\"\r\n| line_format \"{{.status}} {{.method}} {{.path}} time={{.req_time}}\"", + "queryType": "range", + "refId": "E" + } + ], + "title": "5xx Responses", + "type": "logs" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 100, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 1, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 30 + }, + "id": 15, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "direction": "backward", + "editorMode": "code", + "expr": "sum(\r\n count_over_time(\r\n {job=\"$job\"}\r\n | pattern \" - - [] \\\" \\\" \\\"\\\" \\\"\\\" [] [] \"\r\n | status=~\"2..\"\r\n [1m]\r\n )\r\n)", + "legendFormat": "Status 2**", + "queryType": "range", + "refId": "A" + } + ], + "title": "2xx status code per minute", + "type": "timeseries" + }, + { + "datasource": { + "type": "loki", + "uid": "loki" + }, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 30 + }, + "id": 18, + "options": { + "dedupStrategy": "none", + "enableInfiniteScrolling": false, + "enableLogDetails": true, + "prettifyLogMessage": false, + "showCommonLabels": false, + "showLabels": false, + "showTime": true, + "sortOrder": "Descending", + "wrapLogMessage": false + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "direction": "backward", + "editorMode": "code", + "expr": "{job=\"$job\"}\r\n| pattern \" - - [] \\\" \\\" \\\"\\\" \\\"\\\" [] [] \"\r\n| status=~\"2..\"\r\n| line_format \"{{.status}} {{.method}} {{.path}} time={{.req_time}}\"\r\n", + "legendFormat": "", + "queryType": "range", + "refId": "D" + } + ], + "title": "2xx Responses ", + "type": "logs" + } + ], + "preload": false, + "refresh": "30s", + "schemaVersion": 41, + "tags": [ + "nginx" + ], + "templating": { + "list": [ + { + "current": { + "text": "ingress-nginx/controller", + "value": "ingress-nginx/controller" + }, + "datasource": "Loki", + "definition": "", + "name": "job", + "options": [], + "query": { + "label": "job", + "refId": "LokiVariableQueryEditor-VariableQuery", + "stream": "{job=~\".*ingress.*/controller\"}", + "type": 1 + }, + "refresh": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "NGINX Monitoring", + "uid": "een8aog8vuakge", + "version": 34 +} \ No newline at end of file diff --git a/Tusd Metrics.json b/Tusd Metrics.json new file mode 100644 index 0000000..8e306d9 --- /dev/null +++ b/Tusd Metrics.json @@ -0,0 +1,1203 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 28, + "links": [], + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 10, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "editorMode": "code", + "expr": "up{job=\"$job\"}", + "legendFormat": "{{app}}", + "range": true, + "refId": "A" + } + ], + "title": "App Status", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 14, + "x": 10, + "y": 0 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "editorMode": "code", + "expr": "process_start_time_seconds{job=\"$job\"}", + "legendFormat": "{{instance}}", + "range": true, + "refId": "A" + } + ], + "title": "Process Start Time", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 10, + "x": 0, + "y": 5 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "editorMode": "code", + "expr": "rate(process_cpu_seconds_total{job=\"$job\"}[5m])", + "legendFormat": "{{instance}}", + "range": true, + "refId": "A" + } + ], + "title": "CPU Usage (rate)", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "description": " Сравнивает сколько Go-heap занимает и сколько реально занимает весь процесс", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 14, + "x": 10, + "y": 5 + }, + "id": 5, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "editorMode": "code", + "expr": "process_resident_memory_bytes{job=\"$job\"}", + "legendFormat": "Resident Memory ({{instance}})", + "range": true, + "refId": "A" + }, + { + "editorMode": "code", + "expr": "go_memstats_alloc_bytes{job=\"$job\"}", + "legendFormat": "Heap Allocated ({{instance}})", + "range": true, + "refId": "B" + } + ], + "title": "Memory: Resident vs Allocated", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "description": "Слежение за количеством горутин и системных потоков.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 10, + "x": 0, + "y": 12 + }, + "id": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "editorMode": "code", + "expr": "go_goroutines{job=\"$job\"}", + "legendFormat": "Goroutines", + "range": true, + "refId": "A" + }, + { + "editorMode": "code", + "expr": "go_threads{job=\"$job\"}", + "legendFormat": "OS Threads", + "range": true, + "refId": "B" + } + ], + "title": "Goroutines & Threads", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "description": "Показывает производительность GC и его частоту. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 14, + "x": 10, + "y": 12 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "editorMode": "code", + "expr": "rate(go_gc_duration_seconds_sum{job=\"$job\"}[5m])", + "legendFormat": "GC Time Rate (s/sec)", + "range": true, + "refId": "A" + }, + { + "editorMode": "code", + "expr": "go_memstats_next_gc_bytes{job=\"$job\"}", + "legendFormat": "Next GC Threshold (bytes)", + "range": true, + "refId": "B" + } + ], + "title": "GC Duration & Next GC", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "description": "Разделение памяти Go между heap и stack.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 10, + "x": 0, + "y": 19 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "editorMode": "code", + "expr": "go_memstats_heap_alloc_bytes{job=\"$job\"}", + "legendFormat": "Heap Usage (bytes)", + "range": true, + "refId": "A" + }, + { + "editorMode": "code", + "expr": "go_memstats_stack_inuse_bytes{job=\"$job\"}", + "legendFormat": "Stack Usage (bytes)", + "range": true, + "refId": "B" + } + ], + "title": "Heap & Stack Stats", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "description": "Сетевой трафик ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "Network Out (bytes/sec)" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 14, + "x": 10, + "y": 19 + }, + "id": 9, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "editorMode": "code", + "expr": "rate(process_network_receive_bytes_total{job=\"$job\"}[5m])", + "legendFormat": "Network In (bytes/sec) ", + "range": true, + "refId": "A" + }, + { + "editorMode": "code", + "expr": "rate(process_network_transmit_bytes_total{job=\"$job\"}[5m])", + "legendFormat": "Network Out (bytes/sec)", + "range": true, + "refId": "B" + } + ], + "title": "Network I/O", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "description": "Полная картина активности TUSD", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 26 + }, + "id": 10, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "editorMode": "code", + "expr": "rate(tusd_uploads_created{job=\"$job\"}[5m])", + "legendFormat": "tusd_uploads_created", + "range": true, + "refId": "A" + }, + { + "editorMode": "code", + "expr": "rate(tusd_uploads_finished{job=\"$job\"}[5m])", + "legendFormat": "tusd_uploads_finished", + "range": true, + "refId": "B" + }, + { + "editorMode": "code", + "exemplar": false, + "expr": "rate(tusd_uploads_terminated{job=\"$job\"}[5m])", + "legendFormat": "tusd_uploads_terminated", + "range": true, + "refId": "C" + }, + { + "editorMode": "code", + "expr": "rate(tusd_bytes_received{job=\"$job\"}[5m])", + "legendFormat": "tusd_bytes_received", + "range": true, + "refId": "D" + } + ], + "title": "Tusd Uploads", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "description": "Среднюю продолжительность HTTP-запросов к S3.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "series", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 11, + "x": 0, + "y": 32 + }, + "id": 11, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "editorMode": "code", + "expr": "rate(tusd_s3_request_duration_ms_sum{job=\"$job\"}[5m]) ", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "{{operation}}", + "range": true, + "refId": "A" + } + ], + "title": "HTTP S3 Request", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "description": "Среднюю продолжительность записи на диск", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 13, + "x": 11, + "y": 32 + }, + "id": 13, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "editorMode": "code", + "expr": "tusd_s3_disk_write_duration_ms_sum{job=\"$job\"}", + "legendFormat": "Disk Write Duration sum (ms)", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "editorMode": "code", + "expr": "tusd_s3_disk_write_duration_ms_count{job=\"$job\"}", + "hide": false, + "instant": false, + "legendFormat": "Disk Write Duration count (ms)", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "editorMode": "code", + "expr": "tusd_s3_disk_write_duration_ms", + "hide": false, + "instant": false, + "legendFormat": "tusd Disk Write Time {{quantile}}", + "range": true, + "refId": "C" + } + ], + "title": "S3 Disk operations", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "description": "Показывает, насколько стабильно и быстро Prometheus собирает метрики с таргета.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "Samples Scraped (samples/sec)" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 38 + }, + "id": 12, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "11.6.0", + "targets": [ + { + "editorMode": "code", + "expr": "rate(scrape_duration_seconds{job=\"$job\"}[5m])", + "interval": "", + "legendFormat": "Scrape Duration (s) ({{instance}})", + "range": true, + "refId": "A" + }, + { + "editorMode": "code", + "expr": "rate(scrape_samples_scraped{job=\"$job\"}[5m])", + "legendFormat": "Samples Scraped (samples/sec) ({{instance}})", + "range": true, + "refId": "B" + }, + { + "editorMode": "code", + "expr": "rate(promhttp_metric_handler_requests_total{job=\"$job\"}[5m])", + "interval": "", + "legendFormat": "{{code}} ({{instance}})", + "range": true, + "refId": "C" + } + ], + "title": "Prometheus Scrape Health", + "type": "stat" + } + ], + "preload": false, + "refresh": "10s", + "schemaVersion": 41, + "tags": [ + "tusd" + ], + "templating": { + "list": [ + { + "current": { + "text": "integrations/tusd", + "value": "integrations/tusd" + }, + "datasource": { + "type": "prometheus", + "uid": "prom" + }, + "includeAll": false, + "label": "Job", + "name": "job", + "options": [], + "query": "label_values(up, job)", + "refresh": 2, + "type": "query" + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "browser", + "title": "Tusd Metrics", + "uid": "den56bhfbuosgf", + "version": 32 +} \ No newline at end of file