{ "id": null, "uid": "beepi-ingress", "title": "Ingress", "tags": ["beepi", "ingress"], "timezone": "browser", "schemaVersion": 39, "version": 1, "refresh": "30s", "time": {"from": "now-24h", "to": "now"}, "panels": [ { "type": "stat", "title": "Ingress uptime", "id": 1, "gridPos": {"h": 4, "w": 5, "x": 0, "y": 0}, "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "targets": [ { "refId": "A", "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "expr": "time() - max(node_boot_time_seconds{host=\"ingress\"})", "instant": true } ], "fieldConfig": {"defaults": {"unit": "s", "color": {"mode": "fixed", "fixedColor": "blue"}}, "overrides": []}, "options": {"colorMode": "value", "graphMode": "none", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}} }, { "type": "stat", "title": "Tunnel RTT", "id": 2, "gridPos": {"h": 4, "w": 5, "x": 5, "y": 0}, "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "targets": [ { "refId": "A", "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "expr": "max(probe_duration_seconds{probe=\"tunnel-rtt\"})", "instant": true } ], "fieldConfig": { "defaults": {"unit": "s", "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "orange", "value": 0.1}, {"color": "red", "value": 0.3}]}}, "overrides": [] }, "options": {"colorMode": "background", "graphMode": "none", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}} }, { "type": "stat", "title": "Banned hosts (24h)", "id": 3, "gridPos": {"h": 4, "w": 5, "x": 10, "y": 0}, "datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"}, "targets": [ { "refId": "A", "datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"}, "expr": "sum(count_over_time({job=\"fail2ban\", host=\"ingress\"} |= \"Ban\" [24h]))", "queryType": "instant" } ], "fieldConfig": {"defaults": {"unit": "short", "color": {"mode": "fixed", "fixedColor": "orange"}}, "overrides": []}, "options": {"colorMode": "value", "graphMode": "none", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}} }, { "type": "stat", "title": "Blocked packets (24h)", "id": 4, "gridPos": {"h": 4, "w": 9, "x": 15, "y": 0}, "datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"}, "targets": [ { "refId": "A", "datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"}, "expr": "sum(count_over_time({job=\"ufw\", host=\"ingress\"} [24h]))", "queryType": "instant" } ], "fieldConfig": {"defaults": {"unit": "short", "color": {"mode": "fixed", "fixedColor": "purple"}}, "overrides": []}, "options": {"colorMode": "value", "graphMode": "none", "reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}} }, { "type": "table", "title": "WireGuard peers", "id": 5, "gridPos": {"h": 7, "w": 12, "x": 0, "y": 4}, "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "targets": [ { "refId": "age", "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "expr": "max by (peer) (wireguard_peer_handshake_age_seconds)", "instant": true, "format": "table" }, { "refId": "rx", "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "expr": "max by (peer) (wireguard_peer_receive_bytes_total)", "instant": true, "format": "table" }, { "refId": "tx", "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "expr": "max by (peer) (wireguard_peer_transmit_bytes_total)", "instant": true, "format": "table" } ], "transformations": [ {"id": "joinByField", "options": {"byField": "peer", "mode": "outer"}}, {"id": "organize", "options": { "excludeByName": {"Time": true, "Time 1": true, "Time 2": true, "Time 3": true}, "renameByName": {"peer": "Peer", "Value #age": "Last handshake", "Value #rx": "Received", "Value #tx": "Sent"} }} ], "fieldConfig": { "defaults": {"custom": {"align": "auto"}}, "overrides": [ {"matcher": {"id": "byName", "options": "Last handshake"}, "properties": [ {"id": "unit", "value": "s"}, {"id": "custom.cellOptions", "value": {"type": "color-background"}}, {"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "orange", "value": 300}, {"color": "red", "value": 3600}]}} ]}, {"matcher": {"id": "byRegexp", "options": "Received|Sent"}, "properties": [{"id": "unit", "value": "bytes"}]} ] }, "options": {"showHeader": true} }, { "type": "state-timeline", "title": "Tunnel path probes", "id": 6, "gridPos": {"h": 7, "w": 12, "x": 12, "y": 4}, "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "targets": [ { "refId": "A", "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "expr": "min by (probe) (probe_success{vantage=\"ingress\"})", "legendFormat": "{{ '{{' }}probe{{ '}}' }}" } ], "fieldConfig": { "defaults": { "custom": {"fillOpacity": 90, "lineWidth": 0}, "mappings": [{"type": "value", "options": {"0": {"text": "down", "color": "red", "index": 0}, "1": {"text": "up", "color": "green", "index": 1}}}], "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]} }, "overrides": [] }, "options": {"mergeValues": true, "showValue": "never", "legend": {"displayMode": "list", "placement": "bottom", "showLegend": false}} }, { "type": "timeseries", "title": "Ingress host", "id": 7, "gridPos": {"h": 8, "w": 12, "x": 0, "y": 11}, "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "targets": [ { "refId": "A", "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "expr": "100 - (avg(rate(node_cpu_seconds_total{host=\"ingress\",mode=\"idle\"}[5m])) * 100)", "legendFormat": "cpu" }, { "refId": "B", "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "expr": "(1 - (node_memory_MemAvailable_bytes{host=\"ingress\"} / node_memory_MemTotal_bytes{host=\"ingress\"})) * 100", "legendFormat": "memory" }, { "refId": "C", "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "expr": "(1 - (node_filesystem_avail_bytes{host=\"ingress\",mountpoint=\"/\"} / node_filesystem_size_bytes{host=\"ingress\",mountpoint=\"/\"})) * 100", "legendFormat": "disk" } ], "fieldConfig": {"defaults": {"unit": "percent", "max": 100, "min": 0, "custom": {"lineWidth": 2, "fillOpacity": 8}}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom", "showLegend": true}, "tooltip": {"mode": "multi"}} }, { "type": "timeseries", "title": "Ingress network", "id": 8, "gridPos": {"h": 8, "w": 12, "x": 12, "y": 11}, "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "targets": [ { "refId": "A", "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "expr": "rate(node_network_receive_bytes_total{host=\"ingress\",device!~\"lo\"}[5m]) * 8", "legendFormat": "in {{ '{{' }}device{{ '}}' }}" }, { "refId": "B", "datasource": {"type": "prometheus", "uid": "{{ grafana_prometheus_uid }}"}, "expr": "rate(node_network_transmit_bytes_total{host=\"ingress\",device!~\"lo\"}[5m]) * 8", "legendFormat": "out {{ '{{' }}device{{ '}}' }}" } ], "fieldConfig": {"defaults": {"unit": "bps", "custom": {"lineWidth": 2, "fillOpacity": 8}}, "overrides": []}, "options": {"legend": {"displayMode": "list", "placement": "bottom", "showLegend": true}, "tooltip": {"mode": "multi"}} }, { "type": "geomap", "title": "Ban origins", "id": 9, "gridPos": {"h": 11, "w": 12, "x": 0, "y": 19}, "datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"}, "targets": [ { "refId": "A", "datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"}, "expr": "sum by (geoip_location_latitude, geoip_location_longitude, geoip_country_name) (count_over_time({job=\"fail2ban\"} |= \"Ban\" [$__range]))", "queryType": "instant" } ], "options": { "basemap": {"type": "default", "name": "Basemap"}, "layers": [ { "type": "markers", "name": "bans", "location": {"mode": "coords", "latitude": "geoip_location_latitude", "longitude": "geoip_location_longitude"}, "config": {"style": {"color": {"fixed": "red"}, "size": {"field": "Value", "min": 4, "max": 20}, "opacity": 0.6}} } ], "view": {"id": "zero", "lat": 25, "lon": 10, "zoom": 1.6} }, "fieldConfig": {"defaults": {}, "overrides": []} }, { "type": "logs", "title": "Ingress journal and firewall", "id": 10, "gridPos": {"h": 11, "w": 12, "x": 12, "y": 19}, "datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"}, "targets": [ { "refId": "A", "datasource": {"type": "loki", "uid": "{{ grafana_loki_uid }}"}, "expr": "{host=\"ingress\"}", "queryType": "range" } ], "options": { "showTime": true, "sortOrder": "Descending", "wrapLogMessage": true, "enableLogDetails": true, "dedupStrategy": "none", "prettifyLogMessage": false } } ] }