Files
docker-infrastructure/logging/grafana-dashboards/tailscale-proxy.json
T
pipistrello d40941dbde logging dashboard: replace Telemt placeholder with live Zabbix metrics
Replace the static Telemt observation text in the Tailscale proxy dashboard with eight Zabbix-backed panels. Make current unique active client IPs the dominant stat, alongside active/total connections, user and connection history, cumulative traffic, uptime, and byte totals.\n\nAll eight queries were exercised through Grafana's /api/ds/query endpoint against datasource zabbix-02 and returned HTTP 200. Current values included 3 unique active IPs, 10 active connections, and 216 total connections. The provisioned dashboard loaded as version 4, the live and tracked JSON hashes match, and Grafana remains running with zero restarts.
2026-07-27 10:25:09 +03:00

1146 lines
28 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"uid": "tailscale-proxy",
"title": "Tailscale прокси — HTTP (:3128) + Telegram (:1080)",
"tags": [
"proxy",
"tailscale",
"loki",
"telemt",
"zabbix"
],
"schemaVersion": 39,
"version": 4,
"editable": true,
"refresh": "30s",
"time": {
"from": "now-6h",
"to": "now"
},
"timezone": "",
"templating": {
"list": [
{
"name": "datasource",
"type": "datasource",
"query": "loki",
"current": {},
"hide": 0,
"refresh": 1,
"includeAll": false,
"multi": false,
"regex": ""
}
]
},
"annotations": {
"list": []
},
"panels": [
{
"type": "row",
"title": "HTTP-прокси (:3128) — 3proxy",
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"panels": []
},
{
"type": "stat",
"title": "Всего запросов",
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"gridPos": {
"h": 4,
"w": 8,
"x": 0,
"y": 1
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"colorMode": "value",
"graphMode": "none",
"textMode": "auto",
"justifyMode": "auto"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "fixed",
"fixedColor": "purple"
},
"unit": "short"
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "sum(count_over_time({source_ip=\"192.168.0.35\"} |~ \" 3128 00000 \" [$__range]))",
"refId": "A",
"queryType": "instant"
}
]
},
{
"type": "stat",
"title": "Уникальных клиентов",
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"gridPos": {
"h": 4,
"w": 8,
"x": 8,
"y": 1
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"colorMode": "value",
"graphMode": "none",
"textMode": "auto",
"justifyMode": "auto"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "fixed",
"fixedColor": "purple"
},
"unit": "short"
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "count(sum by (clientip)(count_over_time({source_ip=\"192.168.0.35\"} |~ \" 3128 00000 \" | pattern \"<ts> <svc> <err> <user> <clientip>:<cport> <_>\" [$__range])))",
"refId": "A",
"queryType": "instant"
}
]
},
{
"type": "stat",
"title": "Уникальных назначений",
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"gridPos": {
"h": 4,
"w": 8,
"x": 16,
"y": 1
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"colorMode": "value",
"graphMode": "none",
"textMode": "auto",
"justifyMode": "auto"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "fixed",
"fixedColor": "purple"
},
"unit": "short"
},
"overrides": []
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "count(sum by (dest)(count_over_time({source_ip=\"192.168.0.35\"} |~ \" 3128 00000 \" | pattern \"<ts> <svc> <err> <user> <c> <via> <bin> <bout> <flag> <method> <dest> <_>\" [$__range])))",
"refId": "A",
"queryType": "instant"
}
]
},
{
"type": "timeseries",
"title": "Запросы по методам",
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 5
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"fillOpacity": 15,
"stacking": {
"mode": "normal",
"group": "A"
}
},
"unit": "cps"
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "sum by (method)(count_over_time({source_ip=\"192.168.0.35\"} |~ \" 3128 00000 \" | pattern \"<ts> <svc> <err> <user> <c> <via> <bin> <bout> <flag> <method> <dest> <_>\" [$__auto]))",
"refId": "A",
"queryType": "range",
"legendFormat": "{{method}}"
}
]
},
{
"type": "timeseries",
"title": "Трафик клиенту (байт/интервал)",
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 5
},
"fieldConfig": {
"defaults": {
"custom": {
"drawStyle": "line",
"fillOpacity": 15,
"stacking": {
"mode": "none",
"group": "A"
}
},
"unit": "bytes"
},
"overrides": []
},
"options": {
"legend": {
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "sum(sum_over_time({source_ip=\"192.168.0.35\"} |~ \" 3128 00000 \" | pattern \"<ts> <svc> <err> <user> <c> <via> <bin> <bout> <rest>\" | unwrap bout [$__auto]))",
"refId": "A",
"queryType": "range",
"legendFormat": "байт"
}
]
},
{
"type": "table",
"title": "Топ назначений",
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 13
},
"options": {
"showHeader": true,
"sortBy": [
{
"displayName": "соединений",
"desc": true
}
]
},
"fieldConfig": {
"defaults": {
"custom": {
"align": "auto",
"filterable": true
}
},
"overrides": []
},
"transformations": [
{
"id": "labelsToFields",
"options": {}
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true
},
"renameByName": {
"dest": "dest",
"Value #A": "соединений",
"Value": "соединений"
}
}
}
],
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "topk(15, sum by (dest)(count_over_time({source_ip=\"192.168.0.35\"} |~ \" 3128 00000 \" | pattern \"<ts> <svc> <err> <user> <c> <via> <bin> <bout> <flag> <method> <dest> <_>\" [$__range])))",
"refId": "A",
"queryType": "instant"
}
]
},
{
"type": "table",
"title": "Топ клиентов",
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"gridPos": {
"h": 9,
"w": 12,
"x": 12,
"y": 13
},
"options": {
"showHeader": true,
"sortBy": [
{
"displayName": "соединений",
"desc": true
}
]
},
"fieldConfig": {
"defaults": {
"custom": {
"align": "auto",
"filterable": true
}
},
"overrides": []
},
"transformations": [
{
"id": "labelsToFields",
"options": {}
},
{
"id": "organize",
"options": {
"excludeByName": {
"Time": true
},
"renameByName": {
"clientip": "clientip",
"Value #A": "соединений",
"Value": "соединений"
}
}
}
],
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "topk(15, sum by (clientip)(count_over_time({source_ip=\"192.168.0.35\"} |~ \" 3128 00000 \" | pattern \"<ts> <svc> <err> <user> <clientip>:<cport> <_>\" [$__range])))",
"refId": "A",
"queryType": "instant"
}
]
},
{
"type": "logs",
"title": "Журнал доступа HTTP (live)",
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"gridPos": {
"h": 10,
"w": 24,
"x": 0,
"y": 22
},
"options": {
"showTime": true,
"wrapLogMessage": false,
"enableLogDetails": true,
"dedupStrategy": "none",
"sortOrder": "Descending"
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "{source_ip=\"192.168.0.35\"} |~ \" 3128 [0-9]{5} \"",
"queryType": "range",
"refId": "A"
}
]
},
{
"type": "row",
"title": "Telegram MTProto (:1080) — Telemt",
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 32
},
"panels": []
},
{
"id": 20,
"type": "stat",
"title": "Уникальных пользователей сейчас (IP)",
"description": "Текущее число уникальных активных клиентских IP для Telemt user secret `tekhnohim`. Это наиболее близкая доступная метрика к числу подключённых пользователей: несколько клиентов за одним NAT считаются как один IP, а один пользователь с нескольких внешних IP — как несколько.",
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"gridPos": {
"h": 5,
"w": 10,
"x": 0,
"y": 33
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"colorMode": "background",
"graphMode": "area",
"textMode": "value_and_name",
"justifyMode": "center",
"wideLayout": true
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"unit": "short",
"decimals": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "dark-gray",
"value": null
},
{
"color": "green",
"value": 1
}
]
}
},
"overrides": []
},
"targets": [
{
"application": {
"filter": ""
},
"countTriggers": true,
"countTriggersBy": "",
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"evaltype": "0",
"functions": [],
"group": {
"filter": "Linux servers"
},
"host": {
"filter": "Fedora Kirochnaya"
},
"item": {
"filter": "/^Current number of unique active IPs by tekhnohim$/"
},
"itemTag": {
"filter": ""
},
"macro": {
"filter": ""
},
"minSeverity": 3,
"mode": 0,
"options": {
"count": false,
"disableDataAlignment": false,
"showDisabledItems": false,
"skipEmptyValues": false,
"useTrends": "default",
"useZabbixValueMapping": false
},
"proxy": {
"filter": ""
},
"queryType": "0",
"refId": "A",
"resultFormat": "time_series",
"schema": 12,
"table": {
"skipEmptyValues": false
},
"tags": {
"filter": ""
},
"textFilter": "",
"trigger": {
"filter": ""
}
}
]
},
{
"id": 21,
"type": "stat",
"title": "Активных соединений",
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"gridPos": {
"h": 5,
"w": 7,
"x": 10,
"y": 33
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"colorMode": "value",
"graphMode": "area",
"textMode": "value_and_name",
"justifyMode": "center"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "fixed",
"fixedColor": "blue"
},
"unit": "short",
"decimals": 0
},
"overrides": []
},
"targets": [
{
"application": {
"filter": ""
},
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"functions": [],
"group": {
"filter": "Linux servers"
},
"host": {
"filter": "Fedora Kirochnaya"
},
"item": {
"filter": "/^Active connections by tekhnohim$/"
},
"itemTag": {
"filter": ""
},
"mode": 0,
"options": {
"count": false,
"disableDataAlignment": false,
"showDisabledItems": false,
"skipEmptyValues": false,
"useTrends": "default",
"useZabbixValueMapping": false
},
"queryType": "0",
"refId": "A",
"resultFormat": "time_series",
"schema": 12
}
]
},
{
"id": 22,
"type": "stat",
"title": "Всего подключений",
"description": "Накопительный счётчик подключений user secret `tekhnohim` с момента запуска Telemt.",
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"gridPos": {
"h": 5,
"w": 7,
"x": 17,
"y": 33
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"colorMode": "value",
"graphMode": "area",
"textMode": "value_and_name",
"justifyMode": "center"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "fixed",
"fixedColor": "purple"
},
"unit": "short",
"decimals": 0
},
"overrides": []
},
"targets": [
{
"application": {
"filter": ""
},
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"functions": [],
"group": {
"filter": "Linux servers"
},
"host": {
"filter": "Fedora Kirochnaya"
},
"item": {
"filter": "/^Total connections by tekhnohim$/"
},
"itemTag": {
"filter": ""
},
"mode": 0,
"options": {
"count": false,
"disableDataAlignment": false,
"showDisabledItems": false,
"skipEmptyValues": false,
"useTrends": "default",
"useZabbixValueMapping": false
},
"queryType": "0",
"refId": "A",
"resultFormat": "time_series",
"schema": 12
}
]
},
{
"id": 23,
"type": "timeseries",
"title": "Пользователи и соединения",
"description": "Текущее число уникальных активных IP и параллельных Telemt-соединений.",
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 38
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"drawStyle": "line",
"fillOpacity": 15,
"lineInterpolation": "stepAfter",
"lineWidth": 2,
"pointSize": 3,
"showPoints": "never",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "none"
}
},
"unit": "short",
"decimals": 0
},
"overrides": []
},
"options": {
"legend": {
"calcs": [
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"application": {
"filter": ""
},
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"functions": [],
"group": {
"filter": "Linux servers"
},
"host": {
"filter": "Fedora Kirochnaya"
},
"item": {
"filter": "/^(Current number of unique active IPs|Active connections) by tekhnohim$/"
},
"itemTag": {
"filter": ""
},
"mode": 0,
"options": {
"count": false,
"disableDataAlignment": false,
"showDisabledItems": false,
"skipEmptyValues": false,
"useTrends": "default",
"useZabbixValueMapping": false
},
"queryType": "0",
"refId": "A",
"resultFormat": "time_series",
"schema": 12
}
]
},
{
"id": 24,
"type": "timeseries",
"title": "Трафик Telemt (накопительно)",
"description": "Накопительные байтовые счётчики Telemt по user secret `tekhnohim`; сбрасываются при перезапуске сервиса.",
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 12,
"y": 38
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"drawStyle": "line",
"fillOpacity": 15,
"lineInterpolation": "linear",
"lineWidth": 2,
"pointSize": 3,
"showPoints": "never",
"spanNulls": true,
"stacking": {
"group": "A",
"mode": "none"
}
},
"unit": "bytes"
},
"overrides": []
},
"options": {
"legend": {
"calcs": [
"lastNotNull",
"max"
],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "desc"
}
},
"targets": [
{
"application": {
"filter": ""
},
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"functions": [],
"group": {
"filter": "Linux servers"
},
"host": {
"filter": "Fedora Kirochnaya"
},
"item": {
"filter": "/^Bytes (received from|sent to) tekhnohim$/"
},
"itemTag": {
"filter": ""
},
"mode": 0,
"options": {
"count": false,
"disableDataAlignment": false,
"showDisabledItems": false,
"skipEmptyValues": false,
"useTrends": "default",
"useZabbixValueMapping": false
},
"queryType": "0",
"refId": "A",
"resultFormat": "time_series",
"schema": 12
}
]
},
{
"id": 25,
"type": "stat",
"title": "Аптайм Telemt",
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"gridPos": {
"h": 4,
"w": 8,
"x": 0,
"y": 46
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"colorMode": "value",
"graphMode": "none",
"textMode": "value_and_name",
"justifyMode": "center"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "fixed",
"fixedColor": "green"
},
"unit": "s"
},
"overrides": []
},
"targets": [
{
"application": {
"filter": ""
},
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"functions": [],
"group": {
"filter": "Linux servers"
},
"host": {
"filter": "Fedora Kirochnaya"
},
"item": {
"filter": "/^Telemt Uptime$/"
},
"itemTag": {
"filter": ""
},
"mode": 0,
"options": {
"count": false,
"disableDataAlignment": false,
"showDisabledItems": false,
"skipEmptyValues": false,
"useTrends": "default",
"useZabbixValueMapping": false
},
"queryType": "0",
"refId": "A",
"resultFormat": "time_series",
"schema": 12
}
]
},
{
"id": 26,
"type": "stat",
"title": "Получено от клиентов",
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"gridPos": {
"h": 4,
"w": 8,
"x": 8,
"y": 46
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"colorMode": "value",
"graphMode": "none",
"textMode": "value_and_name",
"justifyMode": "center"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "fixed",
"fixedColor": "semi-dark-blue"
},
"unit": "bytes"
},
"overrides": []
},
"targets": [
{
"application": {
"filter": ""
},
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"functions": [],
"group": {
"filter": "Linux servers"
},
"host": {
"filter": "Fedora Kirochnaya"
},
"item": {
"filter": "/^Bytes received from tekhnohim$/"
},
"itemTag": {
"filter": ""
},
"mode": 0,
"options": {
"count": false,
"disableDataAlignment": false,
"showDisabledItems": false,
"skipEmptyValues": false,
"useTrends": "default",
"useZabbixValueMapping": false
},
"queryType": "0",
"refId": "A",
"resultFormat": "time_series",
"schema": 12
}
]
},
{
"id": 27,
"type": "stat",
"title": "Отправлено клиентам",
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"gridPos": {
"h": 4,
"w": 8,
"x": 16,
"y": 46
},
"options": {
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"colorMode": "value",
"graphMode": "none",
"textMode": "value_and_name",
"justifyMode": "center"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "fixed",
"fixedColor": "semi-dark-purple"
},
"unit": "bytes"
},
"overrides": []
},
"targets": [
{
"application": {
"filter": ""
},
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"functions": [],
"group": {
"filter": "Linux servers"
},
"host": {
"filter": "Fedora Kirochnaya"
},
"item": {
"filter": "/^Bytes sent to tekhnohim$/"
},
"itemTag": {
"filter": ""
},
"mode": 0,
"options": {
"count": false,
"disableDataAlignment": false,
"showDisabledItems": false,
"skipEmptyValues": false,
"useTrends": "default",
"useZabbixValueMapping": false
},
"queryType": "0",
"refId": "A",
"resultFormat": "time_series",
"schema": 12
}
]
}
]
}