Files
macos-tools/harbor/cluster-monitoring-dashboard.json
T
bruno 435834dc79 feat: Harbor 版本化配置
- 添加 Harbor 快速恢复脚本 (harbor-quick-restore.sh)
- 添加完整恢复指南 (HARBOR-RESTORE-GUIDE.md)
- 添加版本信息文件 (VERSION.md)
- 更新 .gitignore 排除敏感数据
- 配置 harbor git remote
- 修复 Cloudflare Tunnel 配置

系统重装后可通过以下命令快速恢复:
git clone http://192.168.1.83:33000/gao/ljwx-harbor.git
cd ljwx-harbor
./harbor-quick-restore.sh
2026-02-27 08:12:30 +08:00

260 lines
6.7 KiB
JSON

{
"dashboard": {
"id": null,
"title": "Kubernetes Cluster Overview",
"tags": ["kubernetes", "cluster", "monitoring"],
"timezone": "browser",
"schemaVersion": 16,
"version": 1,
"refresh": "30s",
"panels": [
{
"id": 1,
"title": "CPU Usage",
"type": "timeseries",
"gridPos": {"x": 0, "y": 0, "w": 12, "h": 8},
"targets": [
{
"expr": "100 - (avg by(instance) (rate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100)",
"legendFormat": "{{instance}} CPU Usage",
"refId": "A"
},
{
"expr": "avg(1 - avg by (cpu, mode) (rate(node_cpu_seconds_total{mode=\"idle\"}[5m])))* 100",
"legendFormat": "Cluster CPU Usage",
"refId": "B"
}
],
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"color": {
"mode": "palette-classic"
},
"custom": {
"fillOpacity": 10,
"lineWidth": 2
}
}
}
},
{
"id": 2,
"title": "Memory Usage",
"type": "timeseries",
"gridPos": {"x": 12, "y": 0, "w": 12, "h": 8},
"targets": [
{
"expr": "(node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) / node_memory_MemTotal_bytes * 100",
"legendFormat": "{{instance}} Memory Usage",
"refId": "A"
},
{
"expr": "sum(node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) / sum(node_memory_MemTotal_bytes) * 100",
"legendFormat": "Cluster Memory Usage",
"refId": "B"
}
],
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"color": {
"mode": "palette-classic"
},
"custom": {
"fillOpacity": 10,
"lineWidth": 2
}
}
}
},
{
"id": 3,
"title": "Network I/O",
"type": "timeseries",
"gridPos": {"x": 0, "y": 8, "w": 12, "h": 8},
"targets": [
{
"expr": "sum(rate(node_network_receive_bytes_total[5m])) by (instance)",
"legendFormat": "{{instance}} Receive",
"refId": "A"
},
{
"expr": "sum(rate(node_network_transmit_bytes_total[5m])) by (instance)",
"legendFormat": "{{instance}} Transmit",
"refId": "B"
}
],
"fieldConfig": {
"defaults": {
"unit": "Bps",
"color": {
"mode": "palette-classic"
},
"custom": {
"fillOpacity": 10,
"lineWidth": 2
}
}
}
},
{
"id": 4,
"title": "Storage Usage",
"type": "timeseries",
"gridPos": {"x": 12, "y": 8, "w": 12, "h": 8},
"targets": [
{
"expr": "(node_filesystem_size_bytes - node_filesystem_free_bytes) / node_filesystem_size_bytes * 100",
"legendFormat": "{{instance}} - {{mountpoint}}",
"refId": "A"
}
],
"fieldConfig": {
"defaults": {
"unit": "percent",
"min": 0,
"max": 100,
"color": {
"mode": "palette-classic"
},
"custom": {
"fillOpacity": 10,
"lineWidth": 2
}
}
}
},
{
"id": 5,
"title": "Pod Status",
"type": "stat",
"gridPos": {"x": 0, "y": 16, "w": 6, "h": 6},
"targets": [
{
"expr": "sum(kube_pod_status_phase{phase=\"Running\"})",
"legendFormat": "Running Pods",
"refId": "A"
}
],
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "horizontal"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
}
}
},
{
"id": 6,
"title": "Node Status",
"type": "stat",
"gridPos": {"x": 6, "y": 16, "w": 6, "h": 6},
"targets": [
{
"expr": "sum(kube_node_status_condition{condition=\"Ready\", status=\"true\"})",
"legendFormat": "Ready Nodes",
"refId": "A"
}
],
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "horizontal"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
}
}
}
},
{
"id": 7,
"title": "CPU Load Average",
"type": "timeseries",
"gridPos": {"x": 12, "y": 16, "w": 12, "h": 6},
"targets": [
{
"expr": "node_load1",
"legendFormat": "{{instance}} 1m load",
"refId": "A"
},
{
"expr": "node_load5",
"legendFormat": "{{instance}} 5m load",
"refId": "B"
},
{
"expr": "node_load15",
"legendFormat": "{{instance}} 15m load",
"refId": "C"
}
],
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"fillOpacity": 10,
"lineWidth": 2
}
}
}
}
],
"templating": {
"list": [
{
"name": "namespace",
"type": "query",
"query": "label_values(namespace)",
"includeAll": true,
"allValue": ".*",
"refresh": 1,
"datasource": "Prometheus"
}
]
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
},
"uid": "ff8d57pwaj9c0d",
"version": 1
}
}