diff --git a/README.md b/README.md new file mode 100644 index 0000000..128c324 --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# Kubernetes Vector Grafana Dashboard + +This dashboard was developed with Kubernetes logging in mind. + +![Screenshot1](assets/Screenshot1.png) +![Screenshot2](assets/Screenshot2.png) + +## Available panels with metrics + +- Pods CPU Usage +- Pods Memory Usage +- Discard rate current / sink +- Error rate current +- Events rate current / transform +- Events rate current / source +- Events rate current / sink +- Errors type +- Events sent count / transform +- Events sent count / source +- Events sent count / sink +- Events sent bytes / transform +- Events sent bytes / source +- Events sent bytes / sink +- Buffers count +- Buffer size +- Buffer trends + +## Contribution + +Feel free to ask for help or contribute. diff --git a/assets/Screenshot1.png b/assets/Screenshot1.png new file mode 100644 index 0000000..d910b25 Binary files /dev/null and b/assets/Screenshot1.png differ diff --git a/assets/Screenshot2.png b/assets/Screenshot2.png new file mode 100644 index 0000000..134ad1a Binary files /dev/null and b/assets/Screenshot2.png differ diff --git a/dashboards/k8s-vector-grafana-dashboard.json b/dashboards/k8s-vector-grafana-dashboard.json new file mode 100644 index 0000000..5f65f44 --- /dev/null +++ b/dashboards/k8s-vector-grafana-dashboard.json @@ -0,0 +1,1658 @@ +{ + "__inputs": [ + { + "name": "ds", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": [], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "8.5.15" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "iteration": 1694374690913, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 697, + "panels": [], + "title": "Pods CPU Usage", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "A" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "yellow", + "value": null + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byFrameRefID", + "options": "C" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 3.4285714285714284, + "x": 0, + "y": 1 + }, + "id": 957, + "maxPerRow": 8, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 14 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "8.5.15", + "repeat": "job", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "count(sum by (pod, namespace) (pod:container_cpu_usage:sum{pod=~'.*$job.*',namespace=~'$namespace',container=''}) < 1)", + "hide": false, + "instant": true, + "legendFormat": "Low (< 1CPU)", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "count((sum by (pod, namespace) (pod:container_cpu_usage:sum{pod=~'.*$job.*',namespace=~'$namespace',container=''}) >= 1) < 4)", + "instant": true, + "legendFormat": "Normal (1-4 CPU)", + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "count(sum by (pod, namespace) (pod:container_cpu_usage:sum{pod=~'.*$job.*',namespace=~'$namespace',container=''}) >= 4)", + "hide": false, + "instant": true, + "legendFormat": "High (> 4 CPU)", + "range": false, + "refId": "C" + } + ], + "title": "$job cpu", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 6 + }, + "id": 555, + "panels": [], + "title": "Pods Memory Usage", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byFrameRefID", + "options": "A" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byFrameRefID", + "options": "B" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "yellow", + "value": null + } + ] + } + } + ] + }, + { + "matcher": { + "id": "byFrameRefID", + "options": "C" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + } + ] + } + } + ] + } + ] + }, + "gridPos": { + "h": 5, + "w": 3.4285714285714284, + "x": 0, + "y": 7 + }, + "id": 623, + "maxPerRow": 8, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "value_and_name" + }, + "pluginVersion": "8.5.15", + "repeat": "job", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "count(sum by (pod, namespace) (container_memory_working_set_bytes{pod=~'.*$job.*',namespace=~'$namespace',container=''}) < 1073741824)", + "hide": false, + "instant": true, + "legendFormat": "Low (< 1GB)", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "count((sum by (pod, namespace) (container_memory_working_set_bytes{pod=~'.*$job.*',namespace=~'$namespace',container=''}) >= 1073741824) < 4294967296)", + "instant": true, + "legendFormat": "Normal (1-4GB)", + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "count(sum by (pod, namespace) (container_memory_working_set_bytes{pod=~'.*$job.*',namespace=~'$namespace',container=''}) >= 4294967296)", + "hide": false, + "instant": true, + "legendFormat": "High (> 4GB)", + "range": false, + "refId": "C" + } + ], + "title": "$job mem", + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 12 + }, + "id": 486, + "panels": [], + "title": "Discard rate current / sink", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [], + "max": 100, + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 10 + }, + { + "color": "red", + "value": 25 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "discard count" + }, + "properties": [ + { + "id": "unit", + "value": "short" + } + ] + } + ] + }, + "gridPos": { + "h": 4, + "w": 3.4285714285714284, + "x": 0, + "y": 13 + }, + "id": 487, + "maxPerRow": 8, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 16, + "valueSize": 18 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "8.5.15", + "repeat": "job", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "100 * (\n sum by(job,component_kind)(rate(vector_component_discarded_events_total{job=~\".*$job.*\",component_kind=\"sink\",namespace=~\"$namespace\"}[1m]))\n /\n sum by(job,component_kind)(rate(vector_component_received_events_total{job=~\".*$job.*\",component_kind=\"sink\",namespace=~\"$namespace\"}[1m]))\n )", + "hide": false, + "instant": false, + "legendFormat": "discard %", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by(job,component_kind)(rate(vector_component_discarded_events_total{job=~\".*$job.*\",component_kind=\"sink\",namespace=~\"$namespace\"}[1m]))", + "hide": false, + "instant": false, + "legendFormat": "discard count", + "range": true, + "refId": "A" + } + ], + "title": "$job", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "[a-z0-9-_]+/([a-z0-9-_]+)", + "renamePattern": "$1" + } + } + ], + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 17 + }, + "id": 411, + "panels": [], + "title": "Error rate current", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [], + "noValue": "0", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 10 + }, + { + "color": "red", + "value": 25 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "error count" + }, + "properties": [ + { + "id": "unit", + "value": "short" + } + ] + } + ] + }, + "gridPos": { + "h": 4, + "w": 3.4285714285714284, + "x": 0, + "y": 18 + }, + "id": 412, + "maxPerRow": 8, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 16, + "valueSize": 18 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "8.5.15", + "repeat": "job", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "100 * (\n sum by(job)(rate(vector_component_errors_total{job=~\".*$job.*\",namespace=~\"$namespace\"}[1m]))\n /\n sum by(job)(rate(vector_component_received_events_total{job=~\".*$job.*\",namespace=~\"$namespace\"}[1m]))\n )", + "hide": true, + "instant": false, + "legendFormat": "error %", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by(job)(rate(vector_component_errors_total{job=~\".*$job.*\",namespace=~\"$namespace\"}[1m]))", + "hide": false, + "instant": false, + "legendFormat": "error count", + "range": true, + "refId": "A" + } + ], + "title": "$job", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "[a-z0-9-_]+/([a-z0-9-_]+)", + "renamePattern": "$1" + } + } + ], + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 22 + }, + "id": 312, + "panels": [], + "repeat": "component_kind", + "title": "Events rate current / $component_kind", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [], + "noValue": "N/A", + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "green", + "value": 10 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "blackhole" + }, + "properties": [ + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 1 + }, + { + "color": "red", + "value": 100 + } + ] + } + } + ] + } + ] + }, + "gridPos": { + "h": 7, + "w": 3.4285714285714284, + "x": 0, + "y": 23 + }, + "id": 325, + "maxPerRow": 8, + "options": { + "colorMode": "background", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": { + "titleSize": 16, + "valueSize": 18 + }, + "textMode": "value_and_name" + }, + "pluginVersion": "8.5.15", + "repeat": "job", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (job, component_kind,component_type) (rate(vector_component_sent_events_total{job=~\".*$job.*\",component_type!=\"prometheus_exporter\", component_kind=\"$component_kind\", component_type!=\"internal_metrics\",namespace=~\"$namespace\"}[1m]))", + "instant": false, + "legendFormat": "{{component_type}}", + "range": true, + "refId": "A" + } + ], + "title": "$job", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "[a-z0-9-_]+/([a-z0-9-_]+)", + "renamePattern": "$1" + } + } + ], + "type": "stat" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 30 + }, + "id": 1013, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "bars", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 3.4285714285714284, + "x": 0, + "y": 23 + }, + "id": 1068, + "maxPerRow": 8, + "options": { + "legend": { + "calcs": [ + "max" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.15", + "repeat": "job", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": true, + "expr": "sum by (component_name, component_kind,component_type,error_type) (rate(vector_component_errors_total{job=~'.*$job.*',namespace=~'$namespace'}[1m])) > 0", + "format": "time_series", + "hide": false, + "instant": false, + "legendFormat": "{{component_kind}}/{{component_name}}/{{component_type}}/{{error_type}}", + "range": true, + "refId": "B" + } + ], + "title": "$job errors types", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": false + }, + "indexByName": {}, + "renameByName": { + "Value": "Count", + "component_kind": "Kind", + "component_name": "Name", + "component_type": "Type", + "error_type": "Error" + } + } + } + ], + "type": "timeseries" + } + ], + "title": "Errors type", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 31 + }, + "id": 42, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 3.4285714285714284, + "x": 0, + "y": 40 + }, + "id": 43, + "maxPerRow": 8, + "options": { + "legend": { + "calcs": [ + "min", + "mean", + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "sortBy": "Last *", + "sortDesc": false + }, + "tooltip": { + "mode": "single", + "sort": "asc" + } + }, + "pluginVersion": "8.5.15", + "repeat": "job", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (job, component_kind,component_type,component_name) (irate(vector_component_sent_events_total{job=~\".*$job.*\",component_type!=\"prometheus_exporter\", component_kind=\"$component_kind\", component_type!=\"internal_metrics\",namespace=~\"$namespace\"}[1m]))", + "instant": false, + "legendFormat": "{{component_type}} / {{component_name}}", + "range": true, + "refId": "A" + } + ], + "title": "$job", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "[a-z0-9-_]+/([a-z0-9-_]+)", + "renamePattern": "$1" + } + } + ], + "type": "timeseries" + } + ], + "repeat": "component_kind", + "title": "Events sent count / $component_kind", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 32 + }, + "id": 14, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 3.4285714285714284, + "x": 0, + "y": 48 + }, + "id": 156, + "maxPerRow": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.15", + "repeat": "job", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum by (job,component_kind,component_type,component_name)(rate(vector_component_sent_event_bytes_total{job=~\".*$job.*\",component_kind=\"$component_kind\", component_type!=\"internal_metrics\",component_type!=\"prometheus_exporter\",namespace=~\"$namespace\"}[1m]))", + "instant": false, + "legendFormat": "{{component_type}} / {{component_name}}", + "range": true, + "refId": "A" + } + ], + "title": "$job", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "[a-z0-9-_]+/([a-z0-9-_]+)", + "renamePattern": "$1" + } + } + ], + "type": "timeseries" + } + ], + "repeat": "component_kind", + "title": "Events sent bytes / $component_kind", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 33 + }, + "id": 45, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 3.4285714285714284, + "x": 0, + "y": 56 + }, + "id": 46, + "maxPerRow": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "asc" + } + }, + "pluginVersion": "8.5.15", + "repeat": "job", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "expr": "sum by (job, component_kind,component_type,component_name) (vector_buffer_events{job=~\".*$job.*\",component_type!=\"prometheus_exporter\", component_kind!=\"transform\", component_type!=\"internal_metrics\",namespace=~\"$namespace\"})", + "hide": false, + "legendFormat": "{{component_type}} / {{component_name}}", + "range": true, + "refId": "B" + } + ], + "title": "$job sink", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "[a-z0-9-_]+/([a-z0-9-_]+)", + "renamePattern": "$1" + } + } + ], + "type": "timeseries" + } + ], + "title": "Buffers count", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 34 + }, + "id": 106, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "area" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "#EAB839", + "value": 629145600 + }, + { + "color": "red", + "value": 1073741824.0023 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 3.4285714285714284, + "x": 0, + "y": 64 + }, + "id": 104, + "maxPerRow": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.15", + "repeat": "job", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "exemplar": false, + "expr": "max by (job,component_kind,component_type,component_name)(vector_buffer_byte_size{job=~\".*$job.*\",component_type!=\"prometheus_exporter\",component_type!=\"internal_metrics\",namespace=~\"$namespace\"})", + "hide": false, + "instant": false, + "legendFormat": "{{component_kind}} / {{component_type}} / {{component_name}}", + "range": true, + "refId": "A" + } + ], + "title": "$job", + "transformations": [], + "type": "timeseries" + } + ], + "title": "Buffer size", + "type": "row" + }, + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 35 + }, + "id": 73, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisLabel": "", + "axisPlacement": "auto", + "axisSoftMin": 0, + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": 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 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 3.4285714285714284, + "x": 0, + "y": 72 + }, + "id": 71, + "maxPerRow": 8, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "asc" + } + }, + "pluginVersion": "8.5.15", + "repeat": "job", + "repeatDirection": "h", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "editorMode": "code", + "expr": "sum by (job,component_kind,component_type,component_name)(rate(vector_buffer_received_bytes_total{job=~\".*$job.*\",component_type!=\"prometheus_exporter\",component_type!=\"internal_metrics\",namespace=~\"$namespace\"}[1m])) - sum by (job,component_kind,component_type,component_name)(rate(vector_buffer_sent_bytes_total{job=~\".*$job.*\",component_type!=\"prometheus_exporter\",component_type!=\"internal_metrics\",namespace=~\"$namespace\"}[1m]))", + "hide": false, + "legendFormat": "{{component_type}} / {{component_name}}", + "range": true, + "refId": "A" + } + ], + "title": "$job sink", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "[a-z0-9-_]+/([a-z0-9-_]+)", + "renamePattern": "$1" + } + } + ], + "type": "timeseries" + } + ], + "title": "Buffer trends", + "type": "row" + } + ], + "refresh": "1m", + "schemaVersion": 36, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": true, + "text": "Prometheus", + "value": "Prometheus" + }, + "hide": 0, + "includeAll": false, + "multi": false, + "name": "ds", + "options": [], + "query": "prometheus", + "queryValue": "", + "refresh": 1, + "regex": "/.*/", + "skipUrlSync": false, + "type": "datasource" + }, + { + "allValue": ".*", + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "definition": "label_values(vector_uptime_seconds{job=~\".*\"}, job)", + "hide": 0, + "includeAll": true, + "label": "Job", + "multi": true, + "name": "job", + "options": [], + "query": { + "query": "label_values(vector_uptime_seconds{job=~\".*\"}, job)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "(?:[a-z][a-z0-9\\-]+\\/)(?:vector-){0,1}(.*(aggregator|agent))(?:-vector){0,1}", + "skipUrlSync": false, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "definition": "label_values(vector_component_sent_event_bytes_total{job=~\".*$job.*\"}, component_kind)", + "hide": 0, + "includeAll": true, + "label": "Kind", + "multi": true, + "name": "component_kind", + "options": [], + "query": { + "query": "label_values(vector_component_sent_event_bytes_total{job=~\".*$job.*\"}, component_kind)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 2, + "type": "query" + }, + { + "allValue": "", + "current": {}, + "datasource": { + "type": "prometheus", + "uid": "${ds}" + }, + "definition": "label_values(vector_uptime_seconds{job=~\".*\"}, namespace)", + "hide": 0, + "includeAll": true, + "label": "Namespace", + "multi": true, + "name": "namespace", + "options": [], + "query": { + "query": "label_values(vector_uptime_seconds{job=~\".*\"}, namespace)", + "refId": "StandardVariableQuery" + }, + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Kubernetes / Logging / Vector", + "uid": "reregre", + "version": 1, + "weekStart": "" +}