diff --git a/service/prometheus/service/grafana-dashboard-podman-exporter.json b/service/prometheus/service/grafana-dashboard-podman-exporter.json index c983797..273884d 100644 --- a/service/prometheus/service/grafana-dashboard-podman-exporter.json +++ b/service/prometheus/service/grafana-dashboard-podman-exporter.json @@ -21,9 +21,12 @@ } ] }, + "description": "Host-wide Podman container metrics", "editable": true, "fiscalYearStartMonth": 0, + "gnetId": 17639, "graphTooltip": 0, + "id": 12, "links": [], "liveNow": false, "panels": [ @@ -38,64 +41,14 @@ "color": { "mode": "thresholds" }, - "mappings": [ - { - "options": { - "0": { - "color": "purple", - "index": 4, - "text": "Created ?" - }, - "1": { - "color": "red", - "index": 3, - "text": "Error ❌" - }, - "2": { - "color": "light-red", - "index": 2, - "text": "Exited ❗️" - }, - "3": { - "color": "light-yellow", - "index": 1, - "text": "Paused ⏸" - }, - "4": { - "color": "light-green", - "index": 0, - "text": "Running ?" - }, - "5": { - "color": "#808080", - "index": 6, - "text": "Degraded ?" - }, - "6": { - "color": "super-light-red", - "index": 7, - "text": "Stopped ?" - }, - "-1": { - "color": "orange", - "index": 5, - "text": "Unkown ❔" - } - }, - "type": "value" + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" }, - { - "options": { - "match": "null", - "result": { - "color": "text", - "index": 8, - "text": "No value " - } - }, - "type": "special" - } - ], + "inspect": false + }, + "mappings": [], "thresholds": { "mode": "absolute", "steps": [ @@ -106,45 +59,519 @@ ] } }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Memory" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + }, + { + "id": "custom.width", + "value": 90 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Status" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "#c0c0c0", + "index": 1, + "text": "created" + }, + "1": { + "index": 2, + "text": "initialized" + }, + "2": { + "color": "green", + "index": 3, + "text": "running" + }, + "3": { + "index": 4, + "text": "stopped" + }, + "4": { + "color": "#808081", + "index": 5, + "text": "paused" + }, + "5": { + "color": "red", + "index": 6, + "text": "exited" + }, + "6": { + "color": "yellow", + "index": 7, + "text": "removing" + }, + "7": { + "color": "yellow", + "index": 8, + "text": "stopping" + }, + "-1": { + "color": "red", + "index": 0, + "text": "unknown" + } + }, + "type": "value" + } + ] + }, + { + "id": "custom.cellOptions", + "value": { + "type": "color-text" + } + }, + { + "id": "custom.width", + "value": 75 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Exit code" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "type": "color-text" + } + }, + { + "id": "mappings", + "value": [ + { + "options": { + "0": { + "color": "#808080", + "index": 0, + "text": "none" + } + }, + "type": "value" + }, + { + "options": { + "from": 1, + "result": { + "color": "red", + "index": 1 + }, + "to": 255 + }, + "type": "range" + } + ] + }, + { + "id": "custom.width", + "value": 75 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Uptime" + }, + "properties": [ + { + "id": "unit", + "value": "s" + }, + { + "id": "custom.width", + "value": 90 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "PID" + }, + "properties": [ + { + "id": "custom.width", + "value": 50 + }, + { + "id": "decimals", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Host" + }, + "properties": [ + { + "id": "custom.width", + "value": 90 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ID" + }, + "properties": [ + { + "id": "custom.width", + "value": 121 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Mem Usage" + }, + "properties": [ + { + "id": "custom.width", + "value": 100 + }, + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "color", + "value": { + "mode": "continuous-GrYlRd" + } + }, + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "gauge" + } + }, + { + "id": "decimals", + "value": 2 + } + ] + } + ] }, "gridPos": { - "h": 12, + "h": 9, "w": 24, "x": 0, "y": 0 }, - "id": 2, + "id": 11, "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "last" - ], + "cellHeight": "sm", + "footer": { + "countRows": false, "fields": "", - "values": false + "reducer": [ + "sum" + ], + "show": false }, - "textMode": "auto" + "showHeader": true, + "sortBy": [] }, - "pluginVersion": "9.5.2", + "pluginVersion": "10.2.1", "targets": [ { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "Prometheus" }, "editorMode": "code", - "expr": "sum by(name) (podman_pod_info * on(id) group_right(name) podman_pod_state)", - "legendFormat": "{{name}}", + "exemplar": false, + "expr": "podman_container_info", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "info" + }, + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "podman_container_state", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "state" + }, + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "podman_container_mem_usage_bytes", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "momery" + }, + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "podman_container_exit_code", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "exit_code" + }, + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "time() - podman_container_started_seconds", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "uptime" + }, + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "podman_container_pids", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "PID" + }, + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "podman_container_mem_usage_bytes / (podman_container_mem_limit_bytes)", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "mem_percentage" + } + ], + "title": "Container Overview", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "id", + "image", + "instance", + "name", + "ports", + "Value #state", + "Value #momery", + "Value #exit_code", + "Value #uptime", + "Value #PID", + "Value #mem_percentage" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "Value #A": true, + "__name__": true, + "job": true + }, + "indexByName": { + "Value #PID": 8, + "Value #exit_code": 10, + "Value #mem_percentage": 4, + "Value #momery": 3, + "Value #state": 7, + "Value #uptime": 9, + "id": 1, + "image": 5, + "instance": 2, + "name": 0, + "ports": 6 + }, + "renameByName": { + "Value": "", + "Value #B": "状态", + "Value #C": "退出代码", + "Value #PID": "PID", + "Value #exit_code": "Exit code", + "Value #ext_code": "错误代码", + "Value #mem_max": "内存使用率", + "Value #mem_percentage": "Mem Usage", + "Value #momery": "Memory", + "Value #state": "Status", + "Value #uptime": "Uptime", + "id": "ID", + "image": "Image", + "instance": "Host", + "name": "name", + "ports": "Port", + "state": "状态" + } + } + } + ], + "type": "table" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 17, + "panels": [], + "title": "Containers", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "decimals": 2, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 70 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 4, + "x": 0, + "y": 10 + }, + "id": 13, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(rate(podman_container_cpu_seconds_total[$__rate_interval])) / count(node_cpu_seconds_total{mode=\"idle\"})", + "format": "time_series", + "instant": false, + "legendFormat": "__auto", "range": true, "refId": "A" } ], - "title": "Services uptime", - "type": "stat" + "title": "Total CPU of containers", + "type": "gauge" }, { "datasource": { @@ -158,32 +585,28 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", - "axisGridShow": true, - "axisLabel": "Sates", + "axisLabel": "", "axisPlacement": "auto", - "axisSoftMax": 6, - "axisSoftMin": -1, "barAlignment": 0, "drawStyle": "line", - "fillOpacity": 0, + "fillOpacity": 12, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, - "lineInterpolation": "stepBefore", - "lineStyle": { - "fill": "solid" - }, + "insertNulls": false, + "lineInterpolation": "linear", "lineWidth": 1, - "pointSize": 8, + "pointSize": 5, "scaleDistribution": { "type": "linear" }, - "showPoints": "never", + "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", @@ -193,7 +616,6 @@ "mode": "off" } }, - "decimals": 0, "mappings": [ { "options": { @@ -241,7 +663,7 @@ "type": "value" } ], - "noValue": "-1", + "noValue": "0", "thresholds": { "mode": "absolute", "steps": [ @@ -250,23 +672,22 @@ "value": null } ] - }, - "unit": "none" + } }, "overrides": [] }, "gridPos": { - "h": 11, - "w": 24, - "x": 0, - "y": 12 + "h": 10, + "w": 10, + "x": 4, + "y": 10 }, - "id": 3, + "id": 36, "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom", + "placement": "right", "showLegend": true }, "tooltip": { @@ -282,13 +703,13 @@ "uid": "PBFA97CFB590B2093" }, "editorMode": "code", - "expr": "sum by(name) (podman_pod_info * on(id) group_right(name) podman_pod_state)", + "expr": "sum by(name) (podman_container_info{name!~\".+infra\"} * on(id) group_right(name) rate(podman_container_cpu_seconds_total[$__rate_interval]))", "legendFormat": "{{name}}", "range": true, "refId": "A" } ], - "title": "Services uptime", + "title": "CPU", "type": "timeseries" }, { @@ -303,6 +724,7 @@ "mode": "palette-classic" }, "custom": { + "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", @@ -316,6 +738,7 @@ "tooltip": false, "viz": false }, + "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, @@ -394,17 +817,17 @@ "overrides": [] }, "gridPos": { - "h": 11, - "w": 12, - "x": 0, - "y": 23 + "h": 10, + "w": 10, + "x": 14, + "y": 10 }, - "id": 4, + "id": 37, "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom", + "placement": "right", "showLegend": true }, "tooltip": { @@ -426,7 +849,7 @@ "refId": "A" } ], - "title": "Memory usage", + "title": "Memory", "type": "timeseries" }, { @@ -438,201 +861,146 @@ "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "mode": "continuous-GrYlRd" }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 12, - "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": [ - { - "options": { - "0": { - "color": "purple", - "index": 4, - "text": "Created" - }, - "1": { - "color": "red", - "index": 3, - "text": "Error" - }, - "2": { - "color": "light-red", - "index": 2, - "text": "Exited" - }, - "3": { - "color": "light-yellow", - "index": 1, - "text": "Paused" - }, - "4": { - "color": "light-green", - "index": 0, - "text": "Running" - }, - "5": { - "color": "#808080", - "index": 6, - "text": "Degraded" - }, - "6": { - "color": "super-light-red", - "index": 7, - "text": "Stopped" - }, - "-1": { - "color": "orange", - "index": 5, - "text": "Unkown" - } + "decimals": 2, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null }, - "type": "value" - } - ], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ { - "color": "green", - "value": null + "color": "#EAB839", + "value": 70 + }, + { + "color": "red", + "value": 90 } ] - } + }, + "unit": "percentunit" }, "overrides": [] }, "gridPos": { - "h": 11, - "w": 12, - "x": 12, - "y": 23 - }, - "id": 7, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "9.1.6", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "editorMode": "code", - "expr": "sum by(name) (podman_container_info{name!~\".+infra\"} * on(id) group_right(name) rate(podman_container_cpu_seconds_total[1m]))", - "legendFormat": "{{name}}", - "range": true, - "refId": "A" - } - ], - "title": "CPU", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PBFA97CFB590B2093" - }, - "description": "", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 12, - "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": [], - "noValue": "0", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 12, + "h": 9, + "w": 4, "x": 0, - "y": 34 + "y": 20 }, - "id": 6, + "id": 29, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "sum(podman_container_mem_usage_bytes) / sum(node_memory_MemTotal_bytes)", + "format": "time_series", + "instant": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Total memory of containers", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 10, + "x": 4, + "y": 20 + }, + "id": 23, "options": { "legend": { "calcs": [], "displayMode": "list", - "placement": "bottom", + "placement": "right", "showLegend": true }, "tooltip": { @@ -640,23 +1008,150 @@ "sort": "none" } }, - "pluginVersion": "9.1.6", "targets": [ { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "Prometheus" }, "editorMode": "code", - "expr": "sum by(name) (podman_container_info{name!~\".+infra\"} * on(id) group_right(name) rate(podman_container_net_output_total[1m]) / 1024)", - "legendFormat": "{{name}}", + "expr": "sum by(name) (podman_container_info{name!~\".+infra\"} * on(id) group_right(name) rate(podman_container_block_input_total[$__rate_interval]))", + "legendFormat": "{{name}} - in", "range": true, - "refId": "A" + "refId": "input" + }, + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "expr": "sum by(name) (podman_container_info{name!~\".+infra\"} * on(id) group_right(name) rate(podman_container_block_output_total[$__rate_interval]))", + "hide": false, + "legendFormat": "{{name}} - out", + "range": true, + "refId": "output" } ], - "title": "Network Output", + "title": "Disk", "type": "timeseries" }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "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": 3600000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "binbps" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 10, + "x": 14, + "y": 20 + }, + "id": 27, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "expr": "sum by(name) (podman_container_info{name!~\".+infra\"} * on(id) group_right(name) rate(podman_container_net_input_total[$__rate_interval]) * 8)", + "legendFormat": "{{name}} - in", + "range": true, + "refId": "input" + }, + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "expr": "sum by(name) (podman_container_info{name!~\".+infra\"} * on(id) group_right(name) rate(podman_container_net_output_total[$__rate_interval]) * 8)", + "hide": false, + "legendFormat": "{{name}} - out", + "range": true, + "refId": "output" + } + ], + "title": "Networking", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 29 + }, + "id": 15, + "panels": [], + "title": "Images", + "type": "row" + }, { "datasource": { "type": "prometheus", @@ -666,106 +1161,363 @@ "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 12, - "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" - } + "fixedColor": "blue", + "mode": "thresholds" }, "mappings": [], - "noValue": "0", "thresholds": { - "mode": "absolute", + "mode": "percentage", "steps": [ { "color": "green", "value": null } ] - } + }, + "unit": "bytes" }, "overrides": [] }, "gridPos": { - "h": 10, - "w": 12, - "x": 12, - "y": 34 + "h": 8, + "w": 4, + "x": 0, + "y": 30 }, - "id": 5, + "id": 33, "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "textMode": "auto", + "wideLayout": true }, - "pluginVersion": "9.1.6", + "pluginVersion": "10.2.1", "targets": [ { "datasource": { "type": "prometheus", - "uid": "PBFA97CFB590B2093" + "uid": "Prometheus" }, "editorMode": "code", - "expr": "sum by(name) (podman_container_info{name!~\".+infra\"} * on(id) group_right(name) rate(podman_container_net_input_total[1m]) / 1024)", - "legendFormat": "{{name}}", + "exemplar": false, + "expr": "sum(podman_image_size)", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "Total Image Size", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "percentage", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 70 + }, + { + "color": "red", + "value": 90 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 4, + "y": 30 + }, + "id": 35, + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "10.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "expr": "sum(podman_image_size) / sum(node_filesystem_size_bytes)", + "legendFormat": "__auto", "range": true, "refId": "A" } ], - "title": "Network input", - "type": "timeseries" + "title": "Disk Percentage", + "type": "gauge" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PBFA97CFB590B2093" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "center", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Create Time" + }, + "properties": [ + { + "id": "unit", + "value": "dateTimeFromNow" + }, + { + "id": "custom.width", + "value": 120 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Size" + }, + "properties": [ + { + "id": "unit", + "value": "bits" + }, + { + "id": "custom.width", + "value": 120 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "ID" + }, + "properties": [ + { + "id": "custom.width", + "value": 120 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Tag" + }, + "properties": [ + { + "id": "custom.width", + "value": 90 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 16, + "x": 8, + "y": 30 + }, + "id": 31, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "10.2.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "podman_image_info", + "format": "table", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "podman_image_created_seconds * 1000", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "Prometheus" + }, + "editorMode": "code", + "exemplar": false, + "expr": "podman_image_size", + "format": "table", + "hide": false, + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "C" + } + ], + "title": "Image Info", + "transformations": [ + { + "id": "filterFieldsByName", + "options": { + "include": { + "names": [ + "id", + "repository", + "tag", + "Value #B", + "Value #C" + ] + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "Value #B": "Create Time", + "Value #C": "Size", + "id": "ID", + "repository": "Name", + "tag": "Tag" + } + } + } + ], + "type": "table" } ], "refresh": "", "schemaVersion": 38, - "style": "dark", - "tags": [], + "tags": [ + "host", + "podman", + "internal" + ], "templating": { "list": [] }, "time": { - "from": "now-1h", + "from": "now-3h", "to": "now" }, - "timepicker": {}, + "timepicker": { + "refresh_intervals": [ + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, "timezone": "", - "title": "Podman", - "uid": "cUITC74Vk", - "version": 10, - "weekStart": "", - "gnetId": 17138, - "description": "Podman exporter dashboard \r\nhttps://github.com/containers/prometheus-podman-exporter" + "title": "Podman Metrics", + "uid": "V1DXpAcVz", + "version": 1, + "weekStart": "" }