{ "dashboard": { "id": null, "title": "Alertmanager to Ntfy Metrics", "timezone": "browser", "schemaVersion": 30, "version": 1, "refresh": "5s", "panels": [ { "type": "graph", "title": "Total HTTP Requests", "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }, "datasource": "Prometheus", "targets": [ { "expr": "sum(rate(http_requests_total[5m])) by (method, status)", "legendFormat": "{{method}} {{status}}", "interval": "", "refId": "A" } ], "yaxes": [ { "format": "short", "label": "Requests per second", "logBase": 1, "min": null, "max": null }, { "format": "short", "label": null, "logBase": 1, "min": null, "max": null } ] }, { "type": "graph", "title": "Total HTTP Request Errors", "gridPos": { "x": 12, "y": 0, "w": 12, "h": 8 }, "datasource": "Prometheus", "targets": [ { "expr": "sum(rate(http_request_errors_total[5m])) by (method, status)", "legendFormat": "{{method}} {{status}}", "interval": "", "refId": "B" } ], "yaxes": [ { "format": "short", "label": "Errors per second", "logBase": 1, "min": null, "max": null }, { "format": "short", "label": null, "logBase": 1, "min": null, "max": null } ] }, { "type": "stat", "title": "Total Requests", "gridPos": { "x": 0, "y": 8, "w": 6, "h": 4 }, "datasource": "Prometheus", "targets": [ { "expr": "sum(http_requests_total)", "legendFormat": "Total Requests", "refId": "C" } ], "fieldConfig": { "defaults": { "unit": "none", "decimals": 0 } } }, { "type": "stat", "title": "Total Errors", "gridPos": { "x": 6, "y": 8, "w": 6, "h": 4 }, "datasource": "Prometheus", "targets": [ { "expr": "sum(http_request_errors_total)", "legendFormat": "Total Errors", "refId": "D" } ], "fieldConfig": { "defaults": { "unit": "none", "decimals": 0 } } }, { "type": "table", "title": "HTTP Requests Breakdown", "gridPos": { "x": 0, "y": 12, "w": 24, "h": 8 }, "datasource": "Prometheus", "targets": [ { "expr": "sum(rate(http_requests_total[5m])) by (path, method, status)", "legendFormat": "{{path}} {{method}} {{status}}", "interval": "", "refId": "E" } ], "columns": [ { "text": "Path", "value": "path" }, { "text": "Method", "value": "method" }, { "text": "Status", "value": "status" }, { "text": "Requests per second", "value": "rate" } ], "transform": "table", "table": { "transform": "timeseries_aggregations", "columns": [ { "text": "Path", "value": "path" }, { "text": "Method", "value": "method" }, { "text": "Status", "value": "status" }, { "text": "Requests per second", "value": "rate" } ] } }, { "type": "stat", "title": "Request Success Rate", "gridPos": { "x": 12, "y": 8, "w": 12, "h": 4 }, "datasource": "Prometheus", "targets": [ { "expr": "1 - (sum(rate(http_request_errors_total[5m])) / sum(rate(http_requests_total[5m])))", "legendFormat": "Success Rate", "refId": "F" } ], "fieldConfig": { "defaults": { "unit": "percent", "decimals": 2, "thresholds": { "mode": "percentage", "steps": [ { "color": "green", "value": 90 }, { "color": "red", "value": 0 } ] } } } } ] } }