{ "__elements": {}, "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "11.1.0" }, { "type": "datasource", "id": "prometheus", "name": "Prometheus", "version": "1.0.0" }, { "type": "panel", "id": "table", "name": "Table", "version": "" }, { "type": "panel", "id": "timeseries", "name": "Time series", "version": "" } ], "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "datasource", "uid": "grafana" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "gnetId": 21559, "graphTooltip": 0, "id": null, "links": [], "panels": [ { "collapsed": false, "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 8, "panels": [], "targets": [ { "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" }, "refId": "A" } ], "title": "CPU", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 1 }, "id": 20, "options": { "legend": { "calcs": [ "mean", "max" ], "displayMode": "table", "placement": "right", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "none" } }, "pluginVersion": "7.4.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "disableTextWrap": false, "editorMode": "code", "expr": "sum by (name) (podman_container_info{instance=~'$instance', name=~\"$name\"} * on(id) group_right (name) rate(podman_container_cpu_seconds_total[1m])\n)", "fullMetaSearch": false, "hide": false, "includeNullMetadata": true, "interval": "", "legendFormat": "__auto", "range": true, "refId": "A", "useBackend": false } ], "title": "CPU Usage", "type": "timeseries" }, { "collapsed": false, "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 8 }, "id": 11, "panels": [], "targets": [ { "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" }, "refId": "A" } ], "title": "Memory", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 9, "w": 24, "x": 0, "y": 9 }, "id": 9, "options": { "legend": { "calcs": [ "mean", "max" ], "displayMode": "table", "placement": "right", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "none" } }, "pluginVersion": "7.4.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "editorMode": "code", "expr": "sum by (name) (\n podman_container_info{instance=~\"$instance\", name=~\"$name\"}\n * on (id) group_right (name)\n (podman_container_mem_usage_bytes / 1024 / 1024)\n)", "hide": false, "interval": "", "legendFormat": "{{name}}", "range": true, "refId": "A" } ], "title": "Memory Usage", "type": "timeseries" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 18 }, "id": 2, "panels": [], "targets": [ { "datasource": { "type": "prometheus", "uid": "PBFA97CFB590B2093" }, "refId": "A" } ], "title": "Network", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "Bytes/sec", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": 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", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 19 }, "id": 14, "options": { "legend": { "calcs": [ "mean", "max" ], "displayMode": "table", "placement": "right", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "none" } }, "pluginVersion": "7.4.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "editorMode": "code", "expr": "sum by(name) (podman_container_info{instance=~\"$instance\", name=~\"$name\"} * on(id) group_right(name) rate(podman_container_net_input_total[1m]) / 1024)", "hide": false, "interval": "", "legendFormat": "{{name}} - Read", "range": true, "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "expr": "sum(rate(podman_container_blkio_device_write_bytes_total{instance=~\"$host\",name=~\"$container\"}[5m])) by (name)", "hide": false, "interval": "", "legendFormat": "{{name}} - Write", "refId": "B" } ], "title": "Recieved Network Traffic", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "Bytes/sec", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": 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", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 19 }, "id": 17, "options": { "legend": { "calcs": [ "mean", "max" ], "displayMode": "table", "placement": "right", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "none" } }, "pluginVersion": "7.4.5", "targets": [ { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "editorMode": "code", "expr": "sum by(name) (podman_container_info{instance=~\"$instance\", name=~\"$name\"} * on(id) group_right(name) rate(podman_container_net_output_total[1m]) / 1024)", "hide": false, "interval": "", "legendFormat": "{{name}} - Read", "range": true, "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "expr": "sum(rate(podman_container_blkio_device_write_bytes_total{instance=~\"$host\",name=~\"$container\"}[5m])) by (name)", "hide": false, "interval": "", "legendFormat": "{{name}} - Write", "refId": "B" } ], "title": "Sent Network Traffic", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "custom": { "align": "center", "cellOptions": { "type": "auto" }, "inspect": false }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "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": 297 } ] }, { "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": 9, "w": 24, "x": 0, "y": 27 }, "id": 21, "options": { "cellHeight": "sm", "footer": { "countRows": false, "fields": "", "reducer": [ "sum" ], "show": false }, "frameIndex": 1, "showHeader": true, "sortBy": [ { "desc": false, "displayName": "Status" } ] }, "pluginVersion": "11.1.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "editorMode": "code", "exemplar": false, "expr": "podman_container_info{instance=~\"$instance\", name=~\"$name\"}", "format": "table", "hide": false, "instant": true, "legendFormat": "__auto", "range": false, "refId": "info" }, { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "editorMode": "code", "exemplar": false, "expr": "(podman_container_info{instance=~\"$instance\", name=~\"$name\"} * on (id) group_right (name) (podman_container_state))", "format": "table", "hide": false, "instant": true, "legendFormat": "状态", "range": false, "refId": "state" }, { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "editorMode": "code", "exemplar": false, "expr": "(podman_container_info{instance=~\"$instance\", name=~\"$name\"} * on (id) group_right (name) (podman_container_mem_usage_bytes))", "format": "table", "hide": false, "instant": true, "legendFormat": "__auto", "range": false, "refId": "momery" }, { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "editorMode": "code", "exemplar": false, "expr": "(podman_container_info{instance=~\"$instance\", name=~\"$name\"} * on (id) group_right (name) (podman_container_exit_code))", "format": "table", "hide": false, "instant": true, "legendFormat": "__auto", "range": false, "refId": "exit_code" }, { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "editorMode": "code", "exemplar": false, "expr": "(podman_container_info{instance=~\"$instance\", name=~\"$name\"} * on (id) group_right (name) (time() - podman_container_started_seconds))", "format": "table", "hide": false, "instant": true, "legendFormat": "__auto", "range": false, "refId": "uptime" }, { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "editorMode": "code", "exemplar": false, "expr": "(podman_container_info{instance=~\"$instance\", name=~\"$name\"} * on (id) group_right (name) (podman_container_pids))", "format": "table", "hide": false, "instant": true, "legendFormat": "__auto", "range": false, "refId": "PID" }, { "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "editorMode": "code", "exemplar": false, "expr": "(podman_container_info{instance=~\"$instance\", name=~\"$name\"} * on (id) group_right (name) (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" } ], "refresh": "auto", "schemaVersion": 39, "tags": [ "podman", "prometheus-podman-exporter" ], "templating": { "list": [ { "current": {}, "includeAll": false, "label": "Datasource", "name": "ds_prometheus", "options": [], "query": "prometheus", "refresh": 1, "regex": "", "type": "datasource" }, { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "definition": "label_values(podman_container_info{instance=~\"$instance\"},instance)", "hide": 0, "includeAll": true, "label": "Host", "multi": false, "name": "instance", "options": [], "query": { "qryType": 1, "query": "label_values(podman_container_info{instance=~\"$instance\"},instance)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 5, "type": "query" }, { "allValue": ".*", "current": {}, "datasource": { "type": "prometheus", "uid": "${ds_prometheus}" }, "definition": "label_values(podman_container_info{name=~\"$name\", instance=~\"$instance\"},name)", "hide": 0, "includeAll": true, "label": "Container", "multi": false, "name": "name", "options": [], "query": { "qryType": 1, "query": "label_values(podman_container_info{name=~\"$name\", instance=~\"$instance\"},name)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" } ] }, "time": { "from": "now-30m", "to": "now" }, "timepicker": { "refresh_intervals": [ "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ], "time_options": [ "5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d" ] }, "timezone": "", "title": "Podman Exporter Dashboard", "uid": "fdsbn3zzogqv4f", "version": 14, "weekStart": "", "description": "This dashboard leverages Prometheus podman exporter as the data source and utilizes various visualization panels like time series and tables, providing critical insights into the operational metrics of Podman containers." }