{ "dashboard": { "id": null, "title": "FischerX 应用监控", "tags": ["fischerx", "application"], "timezone": "browser", "schemaVersion": 38, "version": 1, "refresh": "5s", "panels": [ { "title": "请求速率 (QPS)", "type": "stat", "targets": [ { "expr": "sum(rate(http_requests_total[1m])) by (job)", "legendFormat": "{{job}}" } ], "fieldConfig": { "defaults": { "unit": "short" } }, "gridPos": { "x": 0, "y": 0, "w": 6, "h": 4 } }, { "title": "错误率", "type": "stat", "targets": [ { "expr": "sum(rate(http_requests_total{status=~\"5..\"}[5m])) by (job) / sum(rate(http_requests_total[5m])) by (job) * 100", "legendFormat": "{{job}}" } ], "fieldConfig": { "defaults": { "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 3 }, { "color": "red", "value": 5 } ] }, "unit": "percent" } }, "gridPos": { "x": 6, "y": 0, "w": 6, "h": 4 } }, { "title": "P95 延迟", "type": "stat", "targets": [ { "expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le, job))", "legendFormat": "{{job}}" } ], "fieldConfig": { "defaults": { "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "yellow", "value": 0.5 }, { "color": "red", "value": 1 } ] }, "unit": "s" } }, "gridPos": { "x": 12, "y": 0, "w": 6, "h": 4 } }, { "title": "HTTP请求分布", "type": "graph", "targets": [ { "expr": "sum(rate(http_requests_total[5m])) by (status)", "legendFormat": "{{status}}" } ], "gridPos": { "x": 0, "y": 4, "w": 12, "h": 6 } }, { "title": "延迟分布", "type": "graph", "targets": [ { "expr": "histogram_quantile(0.5, sum(rate(http_request_duration_seconds_bucket[5m])) by (le, route))", "legendFormat": "P50 - {{route}}" }, { "expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket[5m])) by (le, route))", "legendFormat": "P95 - {{route}}" }, { "expr": "histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket[5m])) by (le, route))", "legendFormat": "P99 - {{route}}" } ], "fieldConfig": { "defaults": { "unit": "s" } }, "gridPos": { "x": 12, "y": 4, "w": 12, "h": 6 } } ] } }