Compare commits
4 Commits
auto-updat
...
auto-updat
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
14c0e2e9b3 | ||
|
|
a54e954921 | ||
|
|
b1b0042e80 | ||
|
|
e1230f29b3 |
@@ -55,8 +55,9 @@ spec:
|
||||
echo "ERROR: node ${NODE_NAME} has no mtproxy label"
|
||||
exit 1
|
||||
fi
|
||||
# Build ee-prefixed secret for secure mode
|
||||
EE_SECRET="ee${SECRET}"
|
||||
# Build ee-prefixed secret: ee + secret + hex(tls_domain)
|
||||
# "ya.ru" = 79612e7275
|
||||
EE_SECRET="ee${SECRET}79612e7275"
|
||||
LINK="tg://proxy?server=${SERVER}&port=${TELEMT_PORT}&secret=${EE_SECRET}"
|
||||
echo "Registering telemt: ${SERVER} -> ${LINK}"
|
||||
if kubectl get secret telemt-links -n "${NAMESPACE}" &>/dev/null; then
|
||||
|
||||
@@ -30,6 +30,7 @@ spec:
|
||||
[server]
|
||||
port = 30444
|
||||
metrics_port = 9090
|
||||
metrics_whitelist = ["0.0.0.0/0"]
|
||||
|
||||
[server.api]
|
||||
enabled = true
|
||||
|
||||
@@ -7,6 +7,7 @@ resources:
|
||||
- grafana-alerting-configmap.yaml
|
||||
- alertmanager-config.yaml
|
||||
- furumi-dashboard-cm.yaml
|
||||
- telemt-dashboard-cm.yaml
|
||||
|
||||
helmCharts:
|
||||
- name: kube-prometheus-stack
|
||||
|
||||
568
k8s/core/prom-stack/telemt-dashboard-cm.yaml
Normal file
568
k8s/core/prom-stack/telemt-dashboard-cm.yaml
Normal file
@@ -0,0 +1,568 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: telemt-dashboard
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
data:
|
||||
telemt.json: |-
|
||||
{
|
||||
"annotations": {
|
||||
"list": []
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 1,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"title": "Uptime",
|
||||
"type": "stat",
|
||||
"gridPos": { "h": 4, "w": 4, "x": 0, "y": 0 },
|
||||
"id": 1,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "none",
|
||||
"reduceOptions": { "calc": "lastNotNull", "fields": "", "values": false },
|
||||
"textMode": "auto"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s",
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "color": "red", "value": null },
|
||||
{ "color": "green", "value": 60 }
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "telemt_uptime_seconds{instance=~\"$instance\"}",
|
||||
"legendFormat": "{{instance}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
},
|
||||
{
|
||||
"title": "Active ME Writers",
|
||||
"type": "stat",
|
||||
"gridPos": { "h": 4, "w": 4, "x": 4, "y": 0 },
|
||||
"id": 2,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"reduceOptions": { "calc": "lastNotNull", "fields": "", "values": false },
|
||||
"textMode": "auto"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "color": "red", "value": null },
|
||||
{ "color": "green", "value": 1 }
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "telemt_me_writers_active_current{instance=~\"$instance\"}",
|
||||
"legendFormat": "{{instance}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
},
|
||||
{
|
||||
"title": "Buffer Pool",
|
||||
"type": "stat",
|
||||
"gridPos": { "h": 4, "w": 4, "x": 8, "y": 0 },
|
||||
"id": 3,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "none",
|
||||
"reduceOptions": { "calc": "lastNotNull", "fields": "", "values": false },
|
||||
"textMode": "auto"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "color": "green", "value": null }
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "telemt_buffer_pool_buffers_total{instance=~\"$instance\", kind=\"in_use\"}",
|
||||
"legendFormat": "{{instance}} in_use",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
},
|
||||
{
|
||||
"title": "Connections (total / bad)",
|
||||
"type": "stat",
|
||||
"gridPos": { "h": 4, "w": 6, "x": 12, "y": 0 },
|
||||
"id": 4,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"reduceOptions": { "calc": "lastNotNull", "fields": "", "values": false },
|
||||
"textMode": "auto"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{ "color": "green", "value": null }
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "telemt_connections_total{instance=~\"$instance\"}",
|
||||
"legendFormat": "{{instance}} total",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "telemt_connections_bad_total{instance=~\"$instance\"}",
|
||||
"legendFormat": "{{instance}} bad",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
},
|
||||
{
|
||||
"title": "Connections Rate",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 4 },
|
||||
"id": 10,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 15,
|
||||
"pointSize": 5,
|
||||
"showPoints": "auto"
|
||||
},
|
||||
"unit": "cps",
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"tooltip": { "mode": "multi", "sort": "desc" },
|
||||
"legend": { "displayMode": "list", "placement": "bottom" }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "rate(telemt_connections_total{instance=~\"$instance\"}[5m])",
|
||||
"legendFormat": "{{instance}} accepted",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "rate(telemt_connections_bad_total{instance=~\"$instance\"}[5m])",
|
||||
"legendFormat": "{{instance}} bad",
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"expr": "rate(telemt_handshake_timeouts_total{instance=~\"$instance\"}[5m])",
|
||||
"legendFormat": "{{instance}} hs timeout",
|
||||
"refId": "C"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
},
|
||||
{
|
||||
"title": "Upstream Connect",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 4 },
|
||||
"id": 11,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 15,
|
||||
"pointSize": 5,
|
||||
"showPoints": "auto"
|
||||
},
|
||||
"unit": "cps",
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"tooltip": { "mode": "multi", "sort": "desc" },
|
||||
"legend": { "displayMode": "list", "placement": "bottom" }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "rate(telemt_upstream_connect_success_total{instance=~\"$instance\"}[5m])",
|
||||
"legendFormat": "{{instance}} success",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "rate(telemt_upstream_connect_fail_total{instance=~\"$instance\"}[5m])",
|
||||
"legendFormat": "{{instance}} fail",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
},
|
||||
{
|
||||
"title": "Upstream Connect Duration (success)",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 12 },
|
||||
"id": 12,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "bars",
|
||||
"fillOpacity": 50,
|
||||
"stacking": { "mode": "normal" }
|
||||
},
|
||||
"unit": "short",
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"tooltip": { "mode": "multi", "sort": "desc" },
|
||||
"legend": { "displayMode": "list", "placement": "bottom" }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "increase(telemt_upstream_connect_duration_success_total{instance=~\"$instance\"}[5m])",
|
||||
"legendFormat": "{{instance}} {{bucket}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
},
|
||||
{
|
||||
"title": "ME Writers & Pool",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 12 },
|
||||
"id": 13,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 15,
|
||||
"pointSize": 5,
|
||||
"showPoints": "auto"
|
||||
},
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"tooltip": { "mode": "multi", "sort": "desc" },
|
||||
"legend": { "displayMode": "list", "placement": "bottom" }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "telemt_me_writers_active_current{instance=~\"$instance\"}",
|
||||
"legendFormat": "{{instance}} active",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "telemt_me_writers_warm_current{instance=~\"$instance\"}",
|
||||
"legendFormat": "{{instance}} warm",
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"expr": "telemt_pool_drain_active{instance=~\"$instance\"}",
|
||||
"legendFormat": "{{instance}} draining",
|
||||
"refId": "C"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
},
|
||||
{
|
||||
"title": "Per-User Active Connections",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 20 },
|
||||
"id": 20,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 15,
|
||||
"pointSize": 5,
|
||||
"showPoints": "auto"
|
||||
},
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"tooltip": { "mode": "multi", "sort": "desc" },
|
||||
"legend": { "displayMode": "list", "placement": "bottom" }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "telemt_user_connections_current{instance=~\"$instance\"}",
|
||||
"legendFormat": "{{instance}} {{user}}",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
},
|
||||
{
|
||||
"title": "Per-User Traffic",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 20 },
|
||||
"id": 21,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 15,
|
||||
"pointSize": 5,
|
||||
"showPoints": "auto"
|
||||
},
|
||||
"unit": "Bps",
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"tooltip": { "mode": "multi", "sort": "desc" },
|
||||
"legend": { "displayMode": "list", "placement": "bottom" }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "rate(telemt_user_octets_from_client{instance=~\"$instance\"}[5m])",
|
||||
"legendFormat": "{{instance}} {{user}} rx",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "rate(telemt_user_octets_to_client{instance=~\"$instance\"}[5m])",
|
||||
"legendFormat": "{{instance}} {{user}} tx",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
},
|
||||
{
|
||||
"title": "DC→Client Batching",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 28 },
|
||||
"id": 30,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 15,
|
||||
"pointSize": 5,
|
||||
"showPoints": "auto"
|
||||
},
|
||||
"unit": "Bps",
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"tooltip": { "mode": "multi", "sort": "desc" },
|
||||
"legend": { "displayMode": "list", "placement": "bottom" }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "rate(telemt_me_d2c_payload_bytes_total{instance=~\"$instance\"}[5m])",
|
||||
"legendFormat": "{{instance}} payload",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
},
|
||||
{
|
||||
"title": "ME Errors & Anomalies",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 28 },
|
||||
"id": 31,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 15,
|
||||
"pointSize": 5,
|
||||
"showPoints": "auto"
|
||||
},
|
||||
"unit": "cps",
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"tooltip": { "mode": "multi", "sort": "desc" },
|
||||
"legend": { "displayMode": "list", "placement": "bottom" }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "rate(telemt_me_reconnect_attempts_total{instance=~\"$instance\"}[5m])",
|
||||
"legendFormat": "{{instance}} reconnect",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "rate(telemt_me_handshake_reject_total{instance=~\"$instance\"}[5m])",
|
||||
"legendFormat": "{{instance}} hs reject",
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"expr": "rate(telemt_me_crc_mismatch_total{instance=~\"$instance\"}[5m])",
|
||||
"legendFormat": "{{instance}} crc mismatch",
|
||||
"refId": "C"
|
||||
},
|
||||
{
|
||||
"expr": "rate(telemt_desync_total{instance=~\"$instance\"}[5m])",
|
||||
"legendFormat": "{{instance}} desync",
|
||||
"refId": "D"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
},
|
||||
{
|
||||
"title": "Per-User Unique IPs",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 36 },
|
||||
"id": 40,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 15,
|
||||
"pointSize": 5,
|
||||
"showPoints": "auto"
|
||||
},
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"tooltip": { "mode": "multi", "sort": "desc" },
|
||||
"legend": { "displayMode": "list", "placement": "bottom" }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "telemt_user_unique_ips_current{instance=~\"$instance\"}",
|
||||
"legendFormat": "{{instance}} {{user}} active",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "telemt_user_unique_ips_recent_window{instance=~\"$instance\"}",
|
||||
"legendFormat": "{{instance}} {{user}} recent",
|
||||
"refId": "B"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
},
|
||||
{
|
||||
"title": "Conntrack",
|
||||
"type": "timeseries",
|
||||
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 36 },
|
||||
"id": 41,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineInterpolation": "smooth",
|
||||
"fillOpacity": 15,
|
||||
"pointSize": 5,
|
||||
"showPoints": "auto"
|
||||
},
|
||||
"unit": "cps",
|
||||
"thresholds": { "mode": "absolute", "steps": [{ "color": "green", "value": null }] }
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"tooltip": { "mode": "multi", "sort": "desc" },
|
||||
"legend": { "displayMode": "list", "placement": "bottom" }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"expr": "rate(telemt_conntrack_delete_total{instance=~\"$instance\", result=\"attempt\"}[5m])",
|
||||
"legendFormat": "{{instance}} delete attempt",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "rate(telemt_conntrack_delete_total{instance=~\"$instance\", result=\"error\"}[5m])",
|
||||
"legendFormat": "{{instance}} delete error",
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"expr": "telemt_conntrack_event_queue_depth{instance=~\"$instance\"}",
|
||||
"legendFormat": "{{instance}} queue depth",
|
||||
"refId": "C"
|
||||
}
|
||||
],
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" }
|
||||
}
|
||||
],
|
||||
"refresh": "30s",
|
||||
"schemaVersion": 39,
|
||||
"tags": ["telemt", "mtproxy", "telegram"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {},
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "Datasource",
|
||||
"multi": false,
|
||||
"name": "datasource",
|
||||
"options": [],
|
||||
"query": "prometheus",
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"type": "datasource"
|
||||
},
|
||||
{
|
||||
"current": {},
|
||||
"datasource": { "type": "prometheus", "uid": "${datasource}" },
|
||||
"definition": "label_values(telemt_uptime_seconds, instance)",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"label": "Instance",
|
||||
"multi": true,
|
||||
"name": "instance",
|
||||
"query": "label_values(telemt_uptime_seconds, instance)",
|
||||
"refresh": 2,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 1,
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": { "from": "now-6h", "to": "now" },
|
||||
"title": "Telemt MTProxy",
|
||||
"uid": "telemt-mtproxy"
|
||||
}
|
||||
Reference in New Issue
Block a user