Some checks failed
CD Pipeline / deploy (push) Failing after 59s
- 建立 Gitea Actions CD pipeline (.gitea/workflows/cd.yaml) - 部署模式: rsync Python 檔案至 188 → docker restart (volume mount) - Dockerfile/requirements 變動時自動重建 Docker image - 部署通知: Telegram (開始/成功/失敗) - 健康檢查: https://mo.wooo.work/health (最多 5 次重試) - 同步最新 CLAUDE.md / ADR-008 / memory (2026-04-19) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
498 lines
14 KiB
JSON
498 lines
14 KiB
JSON
{
|
|
"annotations": {
|
|
"list": []
|
|
},
|
|
"editable": true,
|
|
"fiscalYearStartMonth": 0,
|
|
"graphTooltip": 1,
|
|
"id": null,
|
|
"links": [],
|
|
"liveNow": false,
|
|
"panels": [
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
|
|
"id": 100,
|
|
"panels": [],
|
|
"title": "Docker 容器概覽",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 4, "x": 0, "y": 1 },
|
|
"id": 1,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "none",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"title": "運行中容器",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "count(container_last_seen{name=~\".+\"})",
|
|
"legendFormat": "",
|
|
"refId": "A"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null },
|
|
{ "color": "yellow", "value": 2147483648 },
|
|
{ "color": "red", "value": 4294967296 }
|
|
]
|
|
},
|
|
"unit": "bytes"
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 5, "x": 4, "y": 1 },
|
|
"id": 2,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"title": "容器總記憶體使用",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "sum(container_memory_usage_bytes{name=~\".+\"})",
|
|
"legendFormat": "",
|
|
"refId": "A"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null },
|
|
{ "color": "yellow", "value": 50 },
|
|
{ "color": "red", "value": 80 }
|
|
]
|
|
},
|
|
"unit": "percent"
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 5, "x": 9, "y": 1 },
|
|
"id": 3,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"title": "容器總 CPU 使用",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "sum(rate(container_cpu_usage_seconds_total{name=~\".+\"}[5m])) * 100",
|
|
"legendFormat": "",
|
|
"refId": "A"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null }
|
|
]
|
|
},
|
|
"unit": "Bps"
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 5, "x": 14, "y": 1 },
|
|
"id": 4,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"title": "網路 RX 流量",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "sum(rate(container_network_receive_bytes_total{name=~\".+\"}[5m]))",
|
|
"legendFormat": "",
|
|
"refId": "A"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null }
|
|
]
|
|
},
|
|
"unit": "Bps"
|
|
}
|
|
},
|
|
"gridPos": { "h": 4, "w": 5, "x": 19, "y": 1 },
|
|
"id": 5,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"title": "網路 TX 流量",
|
|
"type": "stat",
|
|
"targets": [
|
|
{
|
|
"expr": "sum(rate(container_network_transmit_bytes_total{name=~\".+\"}[5m]))",
|
|
"legendFormat": "",
|
|
"refId": "A"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 },
|
|
"id": 101,
|
|
"panels": [],
|
|
"title": "各容器資源使用",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": {
|
|
"axisBorderShow": false,
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 20,
|
|
"gradientMode": "opacity",
|
|
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
|
|
"insertNulls": false,
|
|
"lineInterpolation": "smooth",
|
|
"lineWidth": 2,
|
|
"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 }]
|
|
},
|
|
"unit": "percent"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 6 },
|
|
"id": 10,
|
|
"options": {
|
|
"legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "right", "showLegend": true },
|
|
"tooltip": { "mode": "multi", "sort": "desc" }
|
|
},
|
|
"title": "各容器 CPU 使用率",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "rate(container_cpu_usage_seconds_total{name=~\"momo.*\"}[5m]) * 100",
|
|
"legendFormat": "{{name}}",
|
|
"refId": "A"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "palette-classic" },
|
|
"custom": {
|
|
"axisBorderShow": false,
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"drawStyle": "line",
|
|
"fillOpacity": 20,
|
|
"gradientMode": "opacity",
|
|
"hideFrom": { "legend": false, "tooltip": false, "viz": false },
|
|
"insertNulls": false,
|
|
"lineInterpolation": "smooth",
|
|
"lineWidth": 2,
|
|
"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 }]
|
|
},
|
|
"unit": "bytes"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 6 },
|
|
"id": 11,
|
|
"options": {
|
|
"legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "right", "showLegend": true },
|
|
"tooltip": { "mode": "multi", "sort": "desc" }
|
|
},
|
|
"title": "各容器記憶體使用",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "container_memory_usage_bytes{name=~\"momo.*\"}",
|
|
"legendFormat": "{{name}}",
|
|
"refId": "A"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 14 },
|
|
"id": 102,
|
|
"panels": [],
|
|
"title": "網路流量",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "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": "smooth",
|
|
"lineWidth": 2,
|
|
"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 }]
|
|
},
|
|
"unit": "Bps"
|
|
}
|
|
},
|
|
"gridPos": { "h": 8, "w": 24, "x": 0, "y": 15 },
|
|
"id": 20,
|
|
"options": {
|
|
"legend": { "calcs": ["mean", "max"], "displayMode": "table", "placement": "right", "showLegend": true },
|
|
"tooltip": { "mode": "multi", "sort": "desc" }
|
|
},
|
|
"title": "容器網路流量",
|
|
"type": "timeseries",
|
|
"targets": [
|
|
{
|
|
"expr": "rate(container_network_receive_bytes_total{name=~\"momo.*\"}[5m])",
|
|
"legendFormat": "{{name}} RX",
|
|
"refId": "A"
|
|
},
|
|
{
|
|
"expr": "rate(container_network_transmit_bytes_total{name=~\"momo.*\"}[5m])",
|
|
"legendFormat": "{{name}} TX",
|
|
"refId": "B"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 23 },
|
|
"id": 103,
|
|
"panels": [],
|
|
"title": "容器狀態列表",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "prometheus",
|
|
"uid": "prometheus"
|
|
},
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": { "mode": "thresholds" },
|
|
"custom": {
|
|
"align": "auto",
|
|
"cellOptions": { "type": "auto" },
|
|
"inspect": false
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null }
|
|
]
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": { "id": "byName", "options": "Container" },
|
|
"properties": [{ "id": "custom.width", "value": 200 }]
|
|
},
|
|
{
|
|
"matcher": { "id": "byName", "options": "CPU %" },
|
|
"properties": [
|
|
{ "id": "unit", "value": "percent" },
|
|
{ "id": "custom.cellOptions", "value": { "mode": "gradient", "type": "gauge" } },
|
|
{ "id": "thresholds", "value": { "mode": "absolute", "steps": [{ "color": "green", "value": null }, { "color": "yellow", "value": 50 }, { "color": "red", "value": 80 }] } }
|
|
]
|
|
},
|
|
{
|
|
"matcher": { "id": "byName", "options": "Memory" },
|
|
"properties": [
|
|
{ "id": "unit", "value": "bytes" },
|
|
{ "id": "custom.cellOptions", "value": { "mode": "gradient", "type": "gauge" } },
|
|
{ "id": "thresholds", "value": { "mode": "absolute", "steps": [{ "color": "green", "value": null }, { "color": "yellow", "value": 536870912 }, { "color": "red", "value": 1073741824 }] } }
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": { "h": 8, "w": 24, "x": 0, "y": 24 },
|
|
"id": 30,
|
|
"options": {
|
|
"cellHeight": "sm",
|
|
"footer": { "countRows": false, "fields": "", "reducer": ["sum"], "show": false },
|
|
"showHeader": true,
|
|
"sortBy": [{ "desc": true, "displayName": "CPU %" }]
|
|
},
|
|
"title": "容器資源使用表",
|
|
"type": "table",
|
|
"targets": [
|
|
{
|
|
"expr": "rate(container_cpu_usage_seconds_total{name=~\"momo.*\"}[5m]) * 100",
|
|
"format": "table",
|
|
"instant": true,
|
|
"legendFormat": "",
|
|
"refId": "CPU"
|
|
},
|
|
{
|
|
"expr": "container_memory_usage_bytes{name=~\"momo.*\"}",
|
|
"format": "table",
|
|
"instant": true,
|
|
"legendFormat": "",
|
|
"refId": "Memory"
|
|
}
|
|
],
|
|
"transformations": [
|
|
{
|
|
"id": "seriesToColumns",
|
|
"options": { "byField": "name" }
|
|
},
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": { "Time": true, "Time 1": true, "Time 2": true, "__name__": true, "__name__ 1": true, "__name__ 2": true, "id": true, "id 1": true, "id 2": true, "image": true, "image 1": true, "image 2": true, "instance": true, "instance 1": true, "instance 2": true, "job": true, "job 1": true, "job 2": true },
|
|
"renameByName": { "Value #CPU": "CPU %", "Value #Memory": "Memory", "name": "Container" }
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"refresh": "30s",
|
|
"schemaVersion": 38,
|
|
"tags": ["wooo", "container", "docker"],
|
|
"templating": { "list": [] },
|
|
"time": { "from": "now-1h", "to": "now" },
|
|
"timepicker": {},
|
|
"timezone": "Asia/Taipei",
|
|
"title": "WOOO 容器監控",
|
|
"uid": "wooo-container-monitoring",
|
|
"version": 1,
|
|
"weekStart": ""
|
|
}
|