Improve VPN client connection management
Build and Deploy Gateway / build-and-push (push) Successful in 20s
Build and Deploy Gateway / deploy (push) Successful in 13s

This commit is contained in:
2026-08-12 21:48:37 +03:00
parent 068a7f9890
commit 9e52ccc24d
22 changed files with 962 additions and 76 deletions
+119 -1
View File
@@ -104,6 +104,14 @@
"legendFormat": "Домены",
"range": false,
"refId": "B"
},
{
"editorMode": "code",
"expr": "time() - harbor_direct_ipv4_packet_last_observed_timestamp_seconds",
"instant": true,
"legendFormat": "Gateway Direct",
"range": false,
"refId": "C"
}
],
"title": "Свежесть данных в конце выбранного периода",
@@ -897,6 +905,116 @@
],
"title": "Источники за выбранный период",
"type": "bargauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "Наблюдённые sing-box байты по фактически выбранному outbound и источнику входа. Короткие соединения и хвост после последнего snapshot могут отсутствовать; это не физический трафик туннеля.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"decimals": 1,
"noValue": "Нет данных",
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 14,
"x": 0,
"y": 60
},
"id": 15,
"options": {
"displayMode": "basic",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showUnfilled": false,
"sizing": "auto",
"valueMode": "text"
},
"targets": [
{
"editorMode": "code",
"expr": "sum by (outbound, source) (increase(harbor_singbox_tracked_bytes_total[$__range])) > 0",
"instant": true,
"legendFormat": "{{outbound}} · {{source}}",
"range": false,
"refId": "A"
}
],
"title": "sing-box: VPN / Direct за выбранный период",
"type": "bargauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"description": "IPv4-пакеты, которые Gateway направил напрямую вместо sing-box: policy Direct или работа при остановленном VPN runtime. Это L3 packet bytes с заголовками и retransmit; их нельзя складывать с sing-box tracker bytes.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"decimals": 1,
"noValue": "Нет данных",
"unit": "bytes"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 10,
"x": 14,
"y": 60
},
"id": 16,
"options": {
"displayMode": "basic",
"maxVizHeight": 300,
"minVizHeight": 16,
"minVizWidth": 8,
"namePlacement": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showUnfilled": false,
"sizing": "auto",
"valueMode": "text"
},
"targets": [
{
"editorMode": "code",
"expr": "sum by (direction) (increase(harbor_direct_ipv4_packet_bytes_total[$__range])) > 0",
"instant": true,
"legendFormat": "{{direction}}",
"range": false,
"refId": "A"
}
],
"title": "Gateway Direct: IPv4-пакеты за выбранный период",
"type": "bargauge"
}
],
"refresh": "30s",
@@ -956,6 +1074,6 @@
"timezone": "browser",
"title": "Harbor Gateway: трафик",
"uid": "harbor-gateway-traffic",
"version": 7,
"version": 8,
"weekStart": "monday"
}