{ "title": "hyperhive ยท notification router", "uid": "hyperhive-swarm-notify-router", "description": "The notification router: forge events in, todos out, and the backlog of each agent's queue.", "tags": ["hyperhive", "swarm", "notify", "router"], "editable": true, "refresh": "1m", "schemaVersion": 39, "time": { "from": "now-24h", "to": "now" }, "timezone": "utc", "version": 1, "panels": [ { "id": 1, "type": "stat", "title": "Events in range", "description": "Forge events the router received in the selected range.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 4, "w": 6, "x": 0, "y": 0 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum(increase({__name__=\"hyperhive.notify_router.events\"}[$__range])) or vector(0)", "instant": true, "legendFormat": "events" } ], "fieldConfig": { "defaults": { "unit": "short", "decimals": 0, "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "value", "justifyMode": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } } }, { "id": 2, "type": "stat", "title": "Todos delivered", "description": "Todos the router put on agents' queues in the range.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 4, "w": 6, "x": 6, "y": 0 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum(increase({__name__=\"hyperhive.notify_router.todos\", outcome=\"delivered\"}[$__range])) or vector(0)", "instant": true, "legendFormat": "delivered" } ], "fieldConfig": { "defaults": { "unit": "short", "decimals": 0, "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "value", "justifyMode": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } } }, { "id": 3, "type": "stat", "title": "Review requests failed", "description": "Review requests the router could not make in the range.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 4, "w": 6, "x": 12, "y": 0 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum(increase({__name__=\"hyperhive.notify_router.review_requests\", outcome=\"failed\"}[$__range])) or vector(0)", "instant": true, "legendFormat": "failed" } ], "fieldConfig": { "defaults": { "unit": "short", "decimals": 0, "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 1 } ] } }, "overrides": [] }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "value", "justifyMode": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } } }, { "id": 4, "type": "stat", "title": "Mean time per event", "description": "Mean time the router took to handle one event, in the range.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 4, "w": 6, "x": 18, "y": 0 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum(increase({__name__=\"hyperhive.notify_router.event.duration_sum\"}[$__range])) / sum(increase({__name__=\"hyperhive.notify_router.event.duration_count\"}[$__range]))", "instant": true, "legendFormat": "mean" } ], "fieldConfig": { "defaults": { "unit": "s", "decimals": 3, "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "value", "justifyMode": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } } }, { "id": 5, "type": "timeseries", "title": "Events by type and outcome", "description": "Forge events per hour, by type and what the router did with them.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 4 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum by (event_type, outcome) (increase({__name__=\"hyperhive.notify_router.events\"}[1h]))", "legendFormat": "{{event_type}} {{outcome}}" } ], "fieldConfig": { "defaults": { "unit": "short", "decimals": 0, "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "lineWidth": 1, "fillOpacity": 10, "showPoints": "never", "spanNulls": false, "axisSoftMin": 0, "stacking": { "mode": "normal", "group": "A" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true, "calcs": [] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 6, "type": "timeseries", "title": "Todos and review requests", "description": "Todos and review requests per hour, by outcome.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 4 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum by (op, outcome) (increase({__name__=\"hyperhive.notify_router.todos\"}[1h]))", "legendFormat": "todo {{op}} {{outcome}}" }, { "refId": "B", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum by (outcome) (increase({__name__=\"hyperhive.notify_router.review_requests\"}[1h]))", "legendFormat": "review request {{outcome}}" } ], "fieldConfig": { "defaults": { "unit": "short", "decimals": 0, "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "lineWidth": 1, "fillOpacity": 10, "showPoints": "never", "spanNulls": false, "axisSoftMin": 0 } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true, "calcs": [] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 7, "type": "timeseries", "title": "Time per event", "description": "Time to handle one event, mean and 95th percentile.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 12 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum(increase({__name__=\"hyperhive.notify_router.event.duration_sum\"}[1h])) / sum(increase({__name__=\"hyperhive.notify_router.event.duration_count\"}[1h]))", "legendFormat": "mean" }, { "refId": "B", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "histogram_quantile(0.95, sum by (le) (increase({__name__=\"hyperhive.notify_router.event.duration_bucket\"}[1h])))", "legendFormat": "p95" } ], "fieldConfig": { "defaults": { "unit": "s", "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "lineWidth": 1, "fillOpacity": 10, "showPoints": "never", "spanNulls": false, "axisSoftMin": 0 } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true, "calcs": [] }, "tooltip": { "mode": "multi", "sort": "desc" } } }, { "id": 8, "type": "timeseries", "title": "Queue backlog", "description": "Messages waiting, awaiting an ack, and redelivered on the agents' queue.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 12 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum({__name__=\"hyperhive.notify_router.consumer.pending\"})", "legendFormat": "pending" }, { "refId": "B", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum({__name__=\"hyperhive.notify_router.consumer.ack_pending\"})", "legendFormat": "waiting for ack" }, { "refId": "C", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum({__name__=\"hyperhive.notify_router.consumer.redelivered\"})", "legendFormat": "redelivered" } ], "fieldConfig": { "defaults": { "unit": "short", "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "lineWidth": 1, "fillOpacity": 10, "showPoints": "never", "spanNulls": false, "axisSoftMin": 0 } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true, "calcs": [] }, "tooltip": { "mode": "multi", "sort": "desc" } } } ] }