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>
256 lines
6.9 KiB
JSON
256 lines
6.9 KiB
JSON
{
|
|
"annotations": {
|
|
"list": []
|
|
},
|
|
"editable": true,
|
|
"fiscalYearStartMonth": 0,
|
|
"graphTooltip": 0,
|
|
"id": null,
|
|
"links": [],
|
|
"liveNow": false,
|
|
"panels": [
|
|
{
|
|
"gridPos": { "h": 2, "w": 24, "x": 0, "y": 0 },
|
|
"id": 1,
|
|
"options": {
|
|
"code": { "language": "plaintext", "showLineNumbers": false, "showMiniMap": false },
|
|
"content": "# 📋 Momo Pro System - 日誌監控中心\n\n實時查看應用程式日誌、訪問記錄和錯誤追蹤",
|
|
"mode": "markdown"
|
|
},
|
|
"type": "text"
|
|
},
|
|
{
|
|
"gridPos": { "h": 4, "w": 6, "x": 0, "y": 2 },
|
|
"id": 2,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["sum"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": { "type": "loki", "uid": "loki" },
|
|
"expr": "sum(count_over_time({job=\"gunicorn-access\"}[$__range])) + sum(count_over_time({job=\"momo-app\"}[$__range])) + sum(count_over_time({job=\"gunicorn-error\"}[$__range]))",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "📊 日誌總數",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"gridPos": { "h": 4, "w": 6, "x": 6, "y": 2 },
|
|
"id": 3,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["sum"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": { "type": "loki", "uid": "loki" },
|
|
"expr": "sum(count_over_time({job=\"gunicorn-access\"} |~ \" 5[0-9][0-9] \"[$__range]))",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "❌ 5xx 錯誤",
|
|
"type": "stat",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null },
|
|
{ "color": "yellow", "value": 1 },
|
|
{ "color": "red", "value": 10 }
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"gridPos": { "h": 4, "w": 6, "x": 12, "y": 2 },
|
|
"id": 4,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["sum"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": { "type": "loki", "uid": "loki" },
|
|
"expr": "sum(count_over_time({job=\"gunicorn-access\"} |~ \" 4[0-9][0-9] \"[$__range]))",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "⚠️ 4xx 錯誤",
|
|
"type": "stat",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null },
|
|
{ "color": "yellow", "value": 10 },
|
|
{ "color": "orange", "value": 50 }
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"gridPos": { "h": 4, "w": 6, "x": 18, "y": 2 },
|
|
"id": 5,
|
|
"options": {
|
|
"colorMode": "value",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": { "calcs": ["sum"], "fields": "", "values": false },
|
|
"textMode": "auto"
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": { "type": "loki", "uid": "loki" },
|
|
"expr": "sum(count_over_time({job=\"gunicorn-access\"} |~ \" 200 \"[$__range]))",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "✅ 成功請求",
|
|
"type": "stat",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{ "color": "green", "value": null }
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"gridPos": { "h": 6, "w": 24, "x": 0, "y": 6 },
|
|
"id": 7,
|
|
"options": {
|
|
"legend": { "displayMode": "list", "placement": "bottom", "showLegend": true },
|
|
"tooltip": { "mode": "single", "sort": "none" }
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": { "type": "loki", "uid": "loki" },
|
|
"expr": "sum(count_over_time({job=\"gunicorn-access\"}[1m]))",
|
|
"legendFormat": "HTTP Requests",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "📈 HTTP 請求趨勢",
|
|
"type": "timeseries",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"drawStyle": "bars",
|
|
"fillOpacity": 80
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"gridPos": { "h": 10, "w": 24, "x": 0, "y": 12 },
|
|
"id": 9,
|
|
"options": {
|
|
"dedupStrategy": "none",
|
|
"enableLogDetails": true,
|
|
"prettifyLogMessage": false,
|
|
"showCommonLabels": false,
|
|
"showLabels": true,
|
|
"showTime": true,
|
|
"sortOrder": "Descending",
|
|
"wrapLogMessage": false
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": { "type": "loki", "uid": "loki" },
|
|
"expr": "{job=\"gunicorn-access\"}",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "📝 Gunicorn 訪問日誌",
|
|
"type": "logs"
|
|
},
|
|
{
|
|
"gridPos": { "h": 10, "w": 24, "x": 0, "y": 22 },
|
|
"id": 10,
|
|
"options": {
|
|
"dedupStrategy": "none",
|
|
"enableLogDetails": true,
|
|
"prettifyLogMessage": false,
|
|
"showCommonLabels": false,
|
|
"showLabels": true,
|
|
"showTime": true,
|
|
"sortOrder": "Descending",
|
|
"wrapLogMessage": false
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": { "type": "loki", "uid": "loki" },
|
|
"expr": "{job=\"momo-app\"}",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "📝 應用程式日誌",
|
|
"type": "logs"
|
|
},
|
|
{
|
|
"gridPos": { "h": 10, "w": 24, "x": 0, "y": 32 },
|
|
"id": 6,
|
|
"options": {
|
|
"dedupStrategy": "none",
|
|
"enableLogDetails": true,
|
|
"prettifyLogMessage": false,
|
|
"showCommonLabels": false,
|
|
"showLabels": false,
|
|
"showTime": true,
|
|
"sortOrder": "Descending",
|
|
"wrapLogMessage": false
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": { "type": "loki", "uid": "loki" },
|
|
"expr": "{job=\"gunicorn-error\"}",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "🚨 Gunicorn 錯誤日誌",
|
|
"type": "logs"
|
|
}
|
|
],
|
|
"refresh": "30s",
|
|
"schemaVersion": 38,
|
|
"style": "dark",
|
|
"tags": ["momo", "logs", "loki"],
|
|
"templating": { "list": [] },
|
|
"time": { "from": "now-1h", "to": "now" },
|
|
"timepicker": {},
|
|
"timezone": "Asia/Taipei",
|
|
"title": "Momo Pro - 日誌監控",
|
|
"uid": "momo-logs",
|
|
"version": 3
|
|
}
|