Files
docker-infrastructure/logging/grafana-dashboards/tailscale-proxy.json
T
pipistrello 3bd63ec710 02-tekhnohim Grafana: show current Telemt client IPs
Add a full-width Telemt table backed by the Zabbix text item telemt.active_ips.list. The panel uses the plugin's frontend Text query path, retains only the latest value, and hides Zabbix metadata so operators see the current user/IP snapshot directly.\n\nMove the existing Telemt history and traffic panels down, bump dashboard version to 5, and retain the 30-second refresh interval. The provisioned dashboard reloaded successfully and Grafana's Zabbix resource endpoint returned a current three-line value for item 249104.
2026-07-27 11:31:51 +03:00

1238 lines
30 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": 5,
"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": 28,
"type": "table",
"title": "Текущие активные IP-адреса Telemt",
"description": "Последний снимок активных IP-адресов из Zabbix item telemt.active_ips.list. Обновляется каждые 30 секунд.",
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"gridPos": {
"h": 6,
"w": 24,
"x": 0,
"y": 38
},
"fieldConfig": {
"defaults": {
"custom": {
"align": "left",
"filterable": false
}
},
"overrides": []
},
"options": {
"cellHeight": "auto",
"footer": {
"countRows": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true,
"sortBy": []
},
"transformations": [
{
"id": "organize",
"options": {
"excludeByName": {
"Host": true,
"Item": true,
"Key": true
},
"renameByName": {
"Last value": "Активные подключения (пользователь | IP)"
}
}
}
],
"targets": [
{
"application": {
"filter": ""
},
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"functions": [],
"group": {
"filter": "Linux servers"
},
"host": {
"filter": "Fedora Kirochnaya"
},
"item": {
"filter": "/^Telemt: Active IP addresses$/"
},
"itemTag": {
"filter": ""
},
"mode": 0,
"options": {
"count": false,
"disableDataAlignment": false,
"showDisabledItems": false,
"skipEmptyValues": true,
"useTrends": "default",
"useZabbixValueMapping": false
},
"queryType": "2",
"refId": "A",
"resultFormat": "table",
"schema": 12,
"textFilter": "",
"useCaptureGroups": false
}
]
},
{
"id": 23,
"type": "timeseries",
"title": "Пользователи и соединения",
"description": "Текущее число уникальных активных IP и параллельных Telemt-соединений.",
"datasource": {
"type": "alexanderzobnin-zabbix-datasource",
"uid": "zabbix-02"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 44
},
"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": 44
},
"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": 52
},
"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": 52
},
"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": 52
},
"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
}
]
}
]
}