Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 14c0e2e9b3 | |||
| a54e954921 | |||
| b1b0042e80 | |||
| e1230f29b3 | |||
| 40d908d1ba | |||
| 1e6a9affad | |||
| f2e8923285 |
@@ -8,6 +8,8 @@ resources:
|
|||||||
- ./telemt-daemonset.yaml
|
- ./telemt-daemonset.yaml
|
||||||
- ./external-secrets.yaml
|
- ./external-secrets.yaml
|
||||||
- ./telemt-external-secrets.yaml
|
- ./telemt-external-secrets.yaml
|
||||||
|
- ./telemt-service.yaml
|
||||||
|
- ./telemt-servicemonitor.yaml
|
||||||
- ./service.yaml
|
- ./service.yaml
|
||||||
- ./secret-reader.yaml
|
- ./secret-reader.yaml
|
||||||
# - ./storage.yaml
|
# - ./storage.yaml
|
||||||
|
|||||||
@@ -55,10 +55,10 @@ spec:
|
|||||||
echo "ERROR: node ${NODE_NAME} has no mtproxy label"
|
echo "ERROR: node ${NODE_NAME} has no mtproxy label"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Build dd-prefixed secret for TLS mode: dd + secret + hex(tls_domain)
|
# Build ee-prefixed secret: ee + secret + hex(tls_domain)
|
||||||
DOMAIN_HEX=$(echo -n 'ya.ru' | xxd -p | tr -d '\n')
|
# "ya.ru" = 79612e7275
|
||||||
DD_SECRET="dd${SECRET}${DOMAIN_HEX}"
|
EE_SECRET="ee${SECRET}79612e7275"
|
||||||
LINK="tg://proxy?server=${SERVER}&port=${TELEMT_PORT}&secret=${DD_SECRET}"
|
LINK="tg://proxy?server=${SERVER}&port=${TELEMT_PORT}&secret=${EE_SECRET}"
|
||||||
echo "Registering telemt: ${SERVER} -> ${LINK}"
|
echo "Registering telemt: ${SERVER} -> ${LINK}"
|
||||||
if kubectl get secret telemt-links -n "${NAMESPACE}" &>/dev/null; then
|
if kubectl get secret telemt-links -n "${NAMESPACE}" &>/dev/null; then
|
||||||
kubectl patch secret telemt-links -n "${NAMESPACE}" \
|
kubectl patch secret telemt-links -n "${NAMESPACE}" \
|
||||||
@@ -90,6 +90,8 @@ spec:
|
|||||||
mountPath: /run/telemt/config.toml
|
mountPath: /run/telemt/config.toml
|
||||||
subPath: config.toml
|
subPath: config.toml
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
- name: etcdir
|
||||||
|
mountPath: /etc/telemt
|
||||||
securityContext:
|
securityContext:
|
||||||
readOnlyRootFilesystem: true
|
readOnlyRootFilesystem: true
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
@@ -107,3 +109,7 @@ spec:
|
|||||||
emptyDir:
|
emptyDir:
|
||||||
medium: Memory
|
medium: Memory
|
||||||
sizeLimit: 1Mi
|
sizeLimit: 1Mi
|
||||||
|
- name: etcdir
|
||||||
|
emptyDir:
|
||||||
|
medium: Memory
|
||||||
|
sizeLimit: 1Mi
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ spec:
|
|||||||
|
|
||||||
[server]
|
[server]
|
||||||
port = 30444
|
port = 30444
|
||||||
|
metrics_port = 9090
|
||||||
|
metrics_whitelist = ["0.0.0.0/0"]
|
||||||
|
|
||||||
[server.api]
|
[server.api]
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: telemt-metrics
|
||||||
|
labels:
|
||||||
|
app: telemt
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
clusterIP: None
|
||||||
|
selector:
|
||||||
|
app: telemt
|
||||||
|
ports:
|
||||||
|
- port: 9090
|
||||||
|
targetPort: 9090
|
||||||
|
protocol: TCP
|
||||||
|
name: metrics
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: telemt-metrics
|
||||||
|
labels:
|
||||||
|
app: telemt
|
||||||
|
release: prometheus
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: telemt
|
||||||
|
endpoints:
|
||||||
|
- port: metrics
|
||||||
|
path: /metrics
|
||||||
|
interval: 30s
|
||||||
|
scrapeTimeout: 10s
|
||||||
|
honorLabels: true
|
||||||
|
namespaceSelector:
|
||||||
|
matchNames:
|
||||||
|
- mtproxy
|
||||||
@@ -7,6 +7,7 @@ resources:
|
|||||||
- grafana-alerting-configmap.yaml
|
- grafana-alerting-configmap.yaml
|
||||||
- alertmanager-config.yaml
|
- alertmanager-config.yaml
|
||||||
- furumi-dashboard-cm.yaml
|
- furumi-dashboard-cm.yaml
|
||||||
|
- telemt-dashboard-cm.yaml
|
||||||
|
|
||||||
helmCharts:
|
helmCharts:
|
||||||
- name: kube-prometheus-stack
|
- name: kube-prometheus-stack
|
||||||
|
|||||||
@@ -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