{ "title": "hyperhive ยท gateway (nginx)", "uid": "hyperhive-gateway", "description": "The gateway nginx on each hive's host: request rate and connections.", "editable": true, "refresh": "1m", "schemaVersion": 39, "tags": ["hyperhive", "gateway", "nginx"], "time": { "from": "now-24h", "to": "now" }, "timezone": "utc", "version": 1, "templating": { "list": [ { "name": "hive", "label": "Hive", "type": "query", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "query": "label_values({__name__=\"nginx.requests\"}, hive)", "refresh": 2, "includeAll": true, "allValue": ".*", "multi": true, "current": { "text": "All", "value": "$__all" }, "sort": 1 } ] }, "panels": [ { "id": 1, "type": "stat", "title": "Requests/s", "description": "Requests per second across the selected gateways.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 4, "w": 8, "x": 0, "y": 0 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum(rate({__name__=\"nginx.requests\", hive=~\"$hive\"}[$__rate_interval])) or vector(0)", "instant": true } ], "fieldConfig": { "defaults": { "unit": "reqps", "decimals": 1, "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "value", "justifyMode": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } } }, { "id": 2, "type": "stat", "title": "Active connections", "description": "Open client connections now, across the selected gateways.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 4, "w": 8, "x": 8, "y": 0 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum({__name__=\"nginx.connections_current\", hive=~\"$hive\", state=\"active\"}) or vector(0)", "instant": true } ], "fieldConfig": { "defaults": { "unit": "short", "decimals": 0, "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "value", "justifyMode": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } } }, { "id": 3, "type": "stat", "title": "Dropped connections", "description": "Connections accepted but not handled over the time range.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 4, "w": 8, "x": 16, "y": 0 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "(sum(increase({__name__=\"nginx.connections_accepted\", hive=~\"$hive\"}[$__range])) - sum(increase({__name__=\"nginx.connections_handled\", hive=~\"$hive\"}[$__range]))) or vector(0)", "instant": true } ], "fieldConfig": { "defaults": { "unit": "short", "decimals": 0, "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "text", "value": null } ] } }, "overrides": [] }, "options": { "graphMode": "none", "colorMode": "value", "textMode": "value", "justifyMode": "auto", "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false } } }, { "id": 4, "type": "timeseries", "title": "Requests per second", "description": "Requests per second, per hive.", "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 (hive) (rate({__name__=\"nginx.requests\", hive=~\"$hive\"}[$__rate_interval]))", "legendFormat": "{{hive}}" } ], "fieldConfig": { "defaults": { "unit": "reqps", "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": 5, "type": "timeseries", "title": "Connections by state", "description": "Client connections per state; active is reading + writing + waiting.", "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 (hive, state) ({__name__=\"nginx.connections_current\", hive=~\"$hive\"})", "legendFormat": "{{hive}} {{state}}" } ], "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" } } }, { "id": 6, "type": "timeseries", "title": "Accepted vs handled", "description": "Connections per second. A gap between the two lines is connections dropped.", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 12 }, "targets": [ { "refId": "A", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum by (hive) (rate({__name__=\"nginx.connections_accepted\", hive=~\"$hive\"}[$__rate_interval]))", "legendFormat": "{{hive}} accepted" }, { "refId": "B", "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, "expr": "sum by (hive) (rate({__name__=\"nginx.connections_handled\", hive=~\"$hive\"}[$__rate_interval]))", "legendFormat": "{{hive}} handled" } ], "fieldConfig": { "defaults": { "unit": "cps", "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" } } } ] }