| 1 | { |
| 2 | "uid": "shithubd-overview", |
| 3 | "title": "shithubd — overview", |
| 4 | "tags": ["shithubd"], |
| 5 | "timezone": "browser", |
| 6 | "schemaVersion": 39, |
| 7 | "version": 1, |
| 8 | "refresh": "30s", |
| 9 | "time": {"from": "now-6h", "to": "now"}, |
| 10 | "templating": { |
| 11 | "list": [ |
| 12 | { |
| 13 | "name": "instance", |
| 14 | "type": "query", |
| 15 | "datasource": "Prometheus", |
| 16 | "query": "label_values(up{job=\"shithubd-web\"}, instance)", |
| 17 | "includeAll": true, |
| 18 | "multi": true |
| 19 | } |
| 20 | ] |
| 21 | }, |
| 22 | "panels": [ |
| 23 | { |
| 24 | "id": 1, |
| 25 | "type": "stat", |
| 26 | "title": "Web up", |
| 27 | "gridPos": {"x": 0, "y": 0, "w": 4, "h": 4}, |
| 28 | "targets": [{"expr": "sum(up{job=\"shithubd-web\"})", "refId": "A"}] |
| 29 | }, |
| 30 | { |
| 31 | "id": 2, |
| 32 | "type": "stat", |
| 33 | "title": "Worker up", |
| 34 | "gridPos": {"x": 4, "y": 0, "w": 4, "h": 4}, |
| 35 | "targets": [{"expr": "sum(up{job=\"shithubd-worker\"})", "refId": "A"}] |
| 36 | }, |
| 37 | { |
| 38 | "id": 3, |
| 39 | "type": "stat", |
| 40 | "title": "Postgres up", |
| 41 | "gridPos": {"x": 8, "y": 0, "w": 4, "h": 4}, |
| 42 | "targets": [{"expr": "up{job=\"postgres\"}", "refId": "A"}] |
| 43 | }, |
| 44 | { |
| 45 | "id": 4, |
| 46 | "type": "stat", |
| 47 | "title": "Job queue depth", |
| 48 | "gridPos": {"x": 12, "y": 0, "w": 4, "h": 4}, |
| 49 | "targets": [{"expr": "shithubd_job_queue_depth", "refId": "A"}], |
| 50 | "fieldConfig": { |
| 51 | "defaults": { |
| 52 | "thresholds": { |
| 53 | "mode": "absolute", |
| 54 | "steps": [ |
| 55 | {"color": "green", "value": null}, |
| 56 | {"color": "yellow", "value": 1000}, |
| 57 | {"color": "red", "value": 5000} |
| 58 | ] |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | }, |
| 63 | { |
| 64 | "id": 5, |
| 65 | "type": "timeseries", |
| 66 | "title": "Request rate by route", |
| 67 | "gridPos": {"x": 0, "y": 4, "w": 12, "h": 8}, |
| 68 | "targets": [ |
| 69 | { |
| 70 | "expr": "sum(rate(http_requests_total{instance=~\"$instance\"}[1m])) by (route)", |
| 71 | "legendFormat": "{{route}}", |
| 72 | "refId": "A" |
| 73 | } |
| 74 | ] |
| 75 | }, |
| 76 | { |
| 77 | "id": 6, |
| 78 | "type": "timeseries", |
| 79 | "title": "p95 latency by route", |
| 80 | "gridPos": {"x": 12, "y": 4, "w": 12, "h": 8}, |
| 81 | "targets": [ |
| 82 | { |
| 83 | "expr": "histogram_quantile(0.95, sum(rate(http_request_duration_seconds_bucket{instance=~\"$instance\"}[5m])) by (route, le))", |
| 84 | "legendFormat": "{{route}}", |
| 85 | "refId": "A" |
| 86 | } |
| 87 | ] |
| 88 | }, |
| 89 | { |
| 90 | "id": 7, |
| 91 | "type": "timeseries", |
| 92 | "title": "DB calls/sec", |
| 93 | "gridPos": {"x": 0, "y": 12, "w": 12, "h": 8}, |
| 94 | "targets": [ |
| 95 | { |
| 96 | "expr": "sum(rate(pg_stat_statements_calls_total[1m]))", |
| 97 | "legendFormat": "calls/sec", |
| 98 | "refId": "A" |
| 99 | } |
| 100 | ] |
| 101 | }, |
| 102 | { |
| 103 | "id": 8, |
| 104 | "type": "timeseries", |
| 105 | "title": "Webhook deliveries (success vs failure)", |
| 106 | "gridPos": {"x": 12, "y": 12, "w": 12, "h": 8}, |
| 107 | "targets": [ |
| 108 | { |
| 109 | "expr": "sum(rate(shithubd_webhook_deliveries_total[1m])) by (result)", |
| 110 | "legendFormat": "{{result}}", |
| 111 | "refId": "A" |
| 112 | } |
| 113 | ] |
| 114 | } |
| 115 | ] |
| 116 | } |