test: extend collector outage to 300 s in telemetry incident

This commit is contained in:
2026-11-20 18:11:19 +03:00
parent d83876fa90
commit 2718c3b432
14 changed files with 818 additions and 587 deletions
+131 -236
View File
@@ -1,263 +1,158 @@
# Наблюдаемость: контрольный запрос (trace + логи), dashboard, перцентили, приватность, правила
# date: 2026-11-20T13:59:52Z
# commit: 5f870e4
# date: 2026-11-20T14:36:18Z
# commit: d83876f
## Prometheus: правила загружены (promtool и /api/v1/rules)
$ docker compose exec -T prometheus promtool check rules /etc/prometheus/rules/messenger.yml
Error response from daemon: Container 81bb4c2a806cbf4ed34b6b599f104167debe5fefbeeef14753ba2eec67350329 is restarting, wait until the container is running
EXIT CODE 1
Checking /etc/prometheus/rules/messenger.yml
SUCCESS: 13 rules found
$ sh -c wget -qO- http://grafana:3000/api/datasources/proxy/uid/prometheus/api/v1/rules | python3 -c 'import json,sys; [print(r["type"], r["name"], r["health"]) for g in json.load(sys.stdin)["data"]["groups"] for r in g["rules"]]'
wget: bad address 'grafana:3000'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.12/json/__init__.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/decoder.py", line 338, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/decoder.py", line 356, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
EXIT CODE 1
alerting MessengerHighErrorRate ok
alerting MessengerApiNotReady ok
alerting MessengerJobQueueLag ok
alerting MessengerSlowApi ok
alerting TelemetryExportFailing ok
recording messenger:http_requests:rate5m ok
recording messenger:http_errors:rate5m ok
recording messenger:http_error_ratio:rate5m ok
recording messenger:http_error_ratio:rate1h ok
recording messenger:http_latency_p95:rate5m ok
recording messenger:http_fast_ratio:rate1h ok
recording messenger:time_to_ready_fast_ratio:rate1h ok
recording messenger:jobs_queue_oldest_age:max ok
## Grafana: datasources с фиксированными UID, dashboard из provisioning
$ sh -c for uid in prometheus loki tempo; do wget -qO- http://grafana:3000/api/datasources/uid/$uid | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d["uid"], d["type"], d["url"])'; done
wget: bad address 'grafana:3000'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.12/json/__init__.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/decoder.py", line 338, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/decoder.py", line 356, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
wget: bad address 'grafana:3000'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.12/json/__init__.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/decoder.py", line 338, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/decoder.py", line 356, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
wget: bad address 'grafana:3000'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.12/json/__init__.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/decoder.py", line 338, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/json/decoder.py", line 356, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
EXIT CODE 1
prometheus prometheus http://prometheus:9090
loki loki http://loki:3100
tempo tempo http://tempo:3200
## Контрольный upload с клиентским traceparent: trace в Tempo и логи в Loki
$ python3 scripts/trace-check.py
Traceback (most recent call last):
File "/usr/lib/python3.12/urllib/request.py", line 1344, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/lib/python3.12/http/client.py", line 1358, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.12/http/client.py", line 1404, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.12/http/client.py", line 1353, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.12/http/client.py", line 1113, in _send_output
self.send(msg)
File "/usr/lib/python3.12/http/client.py", line 1057, in send
self.connect()
File "/usr/lib/python3.12/http/client.py", line 1023, in connect
self.sock = self._create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/socket.py", line 841, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/socket.py", line 978, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -2] Name does not resolve
upload -> 202 queued traceparent 00-0a9700e372765e5f2774c2c5347f8c1b-0de651da523f691b-01
attachment 0a91d4b0-0624-419a-824e-d4ae671e7d2b status ready after 0.57 s
During handling of the above exception, another exception occurred:
trace 0a9700e372765e5f2774c2c5347f8c1b: 79 spans (prisma:* internals except db_query omitted below)
messenger-api SPAN_KIND_SERVER POST /api/v1/chats/{chat_id}/attachments 50.36 ms parent=client
messenger-api SPAN_KIND_CLIENT prisma:engine:db_query 0.48 ms parent=prisma:engine:query
messenger-api SPAN_KIND_CLIENT S3.PutObject 25.34 ms parent=POST /api/v1/chats/{chat_id}/attachments
messenger-api SPAN_KIND_INTERNAL prisma:client:transaction 7.80 ms parent=POST /api/v1/chats/{chat_id}/attachments
messenger-api SPAN_KIND_CLIENT prisma:engine:db_query 0.15 ms parent=prisma:engine:start_transaction
messenger-api SPAN_KIND_CLIENT prisma:engine:db_query 0.81 ms parent=prisma:engine:query
messenger-api SPAN_KIND_CLIENT prisma:engine:db_query 0.51 ms parent=prisma:engine:query
messenger-api SPAN_KIND_CLIENT prisma:engine:db_query 0.27 ms parent=prisma:engine:query
messenger-api SPAN_KIND_CLIENT prisma:engine:db_query 0.31 ms parent=prisma:engine:query
messenger-api SPAN_KIND_CLIENT prisma:engine:db_query 1.33 ms parent=prisma:engine:commit_transaction
messenger-relay SPAN_KIND_PRODUCER attachment.jobs publish 5.71 ms parent=prisma:client:transaction
messenger-worker SPAN_KIND_CONSUMER attachment.jobs process 66.86 ms parent=attachment.jobs publish
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 0.25 ms parent=prisma:engine:connection
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 0.34 ms parent=prisma:engine:query
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 0.26 ms parent=prisma:engine:query
messenger-worker SPAN_KIND_INTERNAL prisma:client:transaction 7.26 ms parent=attachment.jobs process
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 0.14 ms parent=prisma:engine:start_transaction
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 0.48 ms parent=prisma:engine:query
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 0.50 ms parent=prisma:engine:query
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 0.26 ms parent=prisma:engine:query
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 0.27 ms parent=prisma:engine:query
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 1.24 ms parent=prisma:engine:commit_transaction
messenger-worker SPAN_KIND_CLIENT S3.GetObject 3.00 ms parent=attachment.jobs process
messenger-worker SPAN_KIND_INTERNAL attachment.render_variants 12.41 ms parent=attachment.jobs process
messenger-worker SPAN_KIND_CLIENT S3.PutObject 7.85 ms parent=attachment.jobs process
messenger-worker SPAN_KIND_CLIENT S3.PutObject 5.94 ms parent=attachment.jobs process
messenger-worker SPAN_KIND_CLIENT S3.PutObject 5.73 ms parent=attachment.jobs process
messenger-worker SPAN_KIND_CLIENT S3.PutObject 5.69 ms parent=attachment.jobs process
messenger-worker SPAN_KIND_INTERNAL prisma:client:transaction 7.42 ms parent=attachment.jobs process
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 0.16 ms parent=prisma:engine:start_transaction
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 0.61 ms parent=prisma:engine:query
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 0.71 ms parent=prisma:engine:query
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 0.44 ms parent=prisma:engine:query
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 0.26 ms parent=prisma:engine:query
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 1.32 ms parent=prisma:engine:commit_transaction
messenger-worker SPAN_KIND_CLIENT S3.DeleteObject 3.23 ms parent=attachment.jobs process
messenger-worker SPAN_KIND_CLIENT prisma:engine:db_query 1.71 ms parent=prisma:engine:query
Traceback (most recent call last):
File "/work/scripts/trace-check.py", line 134, in <module>
main()
File "/work/scripts/trace-check.py", line 72, in main
auth, chat = session()
^^^^^^^^^
File "/work/scripts/trace-check.py", line 37, in session
_, user = call('POST', BASE + '/api/v1/users', {'username': username, 'display_name': 'Trace check', 'password': password})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/work/scripts/trace-check.py", line 28, in call
with urllib.request.urlopen(request, timeout=15) as response:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 215, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 515, in open
response = self._open(req, data)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 532, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 492, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 1373, in http_open
return self.do_open(http.client.HTTPConnection, req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 1347, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -2] Name does not resolve>
EXIT CODE 1
Loki {service_name=~"messenger-.+"} | trace_id="0a9700e372765e5f2774c2c5347f8c1b"
messenger-worker INFO job.handled span_id=8f3cc8917f60f19d {"timestamp":"2026-11-20T14:36:19.298Z","severity":"INFO","s
messenger-api INFO http.request span_id=70c807e8b4f94da9 {"timestamp":"2026-11-20T14:36:19.155Z","severity":"INFO","s
PASS: client trace continued through api -> relay -> worker, logs linked by trace_id
## Секреты и содержимое не попадают в telemetry; в labels метрик нет ID
$ python3 scripts/telemetry-privacy.py
Traceback (most recent call last):
File "/usr/lib/python3.12/urllib/request.py", line 1344, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/lib/python3.12/http/client.py", line 1358, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.12/http/client.py", line 1404, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.12/http/client.py", line 1353, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.12/http/client.py", line 1113, in _send_output
self.send(msg)
File "/usr/lib/python3.12/http/client.py", line 1057, in send
self.connect()
File "/usr/lib/python3.12/http/client.py", line 1023, in connect
self.sock = self._create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/socket.py", line 841, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/socket.py", line 978, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -2] Name does not resolve
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/work/scripts/telemetry-privacy.py", line 102, in <module>
main()
File "/work/scripts/telemetry-privacy.py", line 51, in main
user = call('POST', '/api/v1/users', {'username': username, 'display_name': 'Privacy', 'password': secrets['password']}, traced())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/work/scripts/telemetry-privacy.py", line 27, in call
with urllib.request.urlopen(urllib.request.Request(BASE + path, data=data, method=method, headers=headers), timeout=15) as r:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 215, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 515, in open
response = self._open(req, data)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 532, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 492, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 1373, in http_open
return self.do_open(http.client.HTTPConnection, req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 1347, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -2] Name does not resolve>
EXIT CODE 1
sent 6 traced requests with known password, token, message text and filename; waiting 25 s for export
Tempo: 6/6 traces fetched (79945 bytes); Loki: 7 log lines carry these trace_ids (control)
password in traces: False log lines in Loki (5 min): 0
message text in traces: False log lines in Loki (5 min): 0
filename in traces: False log lines in Loki (5 min): 0
session token in traces: False log lines in Loki (5 min): 0
basic credentials in traces: False log lines in Loki (5 min): 0
Authorization hdr in traces: False log lines in Loki (5 min): 0
Prometheus: 893 series, 22 metric names from messenger services; label keys: cpu_mode, db_client_connection_state, deployment_environment_name, http_request_method, http_response_status_class, http_route, instance, job, job_type, le, messaging_destination_name, outcome, service_version, state, telemetry_sdk_language, telemetry_sdk_name, telemetry_sdk_version
series with a UUID in any label value: 0
http_route values: /api/v1/attachments/{attachment_id}, /api/v1/attachments/{attachment_id}/content, /api/v1/auth/sessions, /api/v1/auth/sessions/current, /api/v1/chats, /api/v1/chats/{chat_id}, /api/v1/chats/{chat_id}/attachments, /api/v1/chats/{chat_id}/messages, /api/v1/users, /api/v1/users/me, /health/core, /health/live, /health/ready
PASS: no secrets/content in logs and traces, no IDs in metric labels
## Перцентили dashboard против клиентского замера tests/load.py
$ python3 scripts/latency-compare.py --duration 30
Traceback (most recent call last):
File "/work/scripts/latency-compare.py", line 52, in <module>
main()
File "/work/scripts/latency-compare.py", line 31, in main
subprocess.run([sys.executable, 'tests/load.py', '--base-url', BASE, '--duration', duration, '--output', output],
File "/usr/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', 'tests/load.py', '--base-url', 'http://lb:8080', '--duration', '30', '--output', '/tmp/tmpn5jz4yx8/load.json']' returned non-zero exit status 1.
EXIT CODE 1
waiting 25 s for the metric export interval
client (tests/load.py): 3411 requests, 113.4 rps, errors 0
prometheus: 3661 requests in POST /api/v1/chats/{chat_id}/messages over 60 s
client, ms prometheus, ms
p50 18.33 19.68
p95 89.20 92.20
p99 163.29 176.76
server-side histogram excludes network/client overhead; values are interpolated inside buckets (…, 5, 10, 25, 50, 100 ms, …).
## Все запросы dashboard (пустые панели alerts/WARN-логов допустимы без инцидентов)
$ python3 scripts/dashboard-check.py
Traceback (most recent call last):
File "/usr/lib/python3.12/urllib/request.py", line 1344, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/lib/python3.12/http/client.py", line 1358, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.12/http/client.py", line 1404, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.12/http/client.py", line 1353, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.12/http/client.py", line 1113, in _send_output
self.send(msg)
File "/usr/lib/python3.12/http/client.py", line 1057, in send
self.connect()
File "/usr/lib/python3.12/http/client.py", line 1023, in connect
self.sock = self._create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/socket.py", line 841, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/socket.py", line 978, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -2] Name does not resolve
Grafana dashboard: Messenger overview folder: Messenger
OK Доступность API, 1 ч (SLO ≥ 99% без 5xx) A 1 =1
OK Запросы быстрее 500 мс, 1 ч (SLO ≥ 95%) A 1 =1
OK Вложения готовы за ≤ 10 с, 1 ч (SLO ≥ 95%) A 1 =0.6666666666666667
EMPTY Alerts (pending / firing) A 0
OK RPS по маршрутам (без health) A 12 =0, =0, =0, =0
OK Ответы по классам статуса (без health) A 2 2xx=61.1782202581422, 4xx=0
OK Доля 5xx среди бизнес-запросов (окно 5m, порог alert 5%) A 1 =0
OK Длительность API p50 / p95 / p99 (все реплики, без health) A 1 =0.019676691515573837
OK Длительность API p50 / p95 / p99 (все реплики, без health) B 1 =0.09219914944691271
OK Длительность API p50 / p95 / p99 (все реплики, без health) C 1 =0.17675359699995996
OK p95 по маршрутам A 12 =NaN, =NaN, =NaN, =NaN
OK Глубина очереди attachment.jobs (из attachment_jobs) A 3 =0, =0, =0
OK Возраст старейшего готового задания (порог alert 60 s) A 1 =0
OK Worker: занято / ёмкость A 1 =0
OK Worker: занято / ёмкость B 1 =2
OK Worker: занято / ёмкость C 1 =0
OK Задания по исходу (в секунду) A 5 failed=0, malformed=0, retry=0, skipped=0.025
OK Длительность обработки задания p50 / p95 / p99 A 1 =NaN
OK Длительность обработки задания p50 / p95 / p99 B 1 =NaN
OK Длительность обработки задания p50 / p95 / p99 C 1 =NaN
OK Время от upload до ready p50 / p95 / p99 A 1 =NaN
OK Время от upload до ready p50 / p95 / p99 B 1 =NaN
OK Время от upload до ready p50 / p95 / p99 C 1 =NaN
OK Пул БД: занято / ожидают соединения A 3 =0, =0, =0
OK Пул БД: занято / ожидают соединения B 3 =0, =0, =0
OK Пул БД: занято / ожидают соединения C 3 =20, =3, =5
OK CPU процессов (доля ядра) A 4 =0.2771702986118047, =0.2803168326733069, =0.006292157529451772, =0.00
OK CPU процессов (доля ядра) B 2 =0.013556760600942309, =0.0006813251539196734
OK RAM процессов (RSS) A 4 =207585280, =208904192, =90546176, =106270720
OK RAM процессов (RSS) B 2 =210243584, =164040704
OK Принято / отправлено / ошибки отправки (в секунду) A 1 =1512.6751237147007
OK Принято / отправлено / ошибки отправки (в секунду) B 1 =1512.6751237147007
OK Принято / отправлено / ошибки отправки (в секунду) C 1 =0
OK Принято / отправлено / ошибки отправки (в секунду) D 1 =75.96230776068984
OK Принято / отправлено / ошибки отправки (в секунду) E 1 =0
OK Принято / отправлено / ошибки отправки (в секунду) F 1 =0
OK Очередь exporter (ограничена queue_size) A 3 =0, =0, =0
OK Очередь exporter (ограничена queue_size) B 1 =200
OK Логи API и worker (WARN и выше) A 20
OK Все логи (http.request, job.handled, …) A 20
OK Последние трассы (HTTP server и consumer spans) A 20
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/work/scripts/dashboard-check.py", line 57, in <module>
main()
File "/work/scripts/dashboard-check.py", line 43, in main
grafana = get('/api/dashboards/uid/messenger-overview')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/work/scripts/dashboard-check.py", line 19, in get
with urllib.request.urlopen(url, timeout=15) as response:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 215, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 515, in open
response = self._open(req, data)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 532, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 492, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 1373, in http_open
return self.do_open(http.client.HTTPConnection, req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/urllib/request.py", line 1347, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno -2] Name does not resolve>
WARN: 1 empty queries
EXIT CODE 1
## Пример структурного лога (stdout API)
{"timestamp":"2026-11-20T14:37:24.827Z","severity":"INFO","service.name":"messenger-api","event":"http.request","logger":"Http","method":"POST","route":"/api/v1/chats/{chat_id}/messages","status":201,"duration_ms":23.22,"request_id":"078e6db3-d15e-4bdf-bac9-5fe5ea48bd35","trace_id":"67197c10f2dc44bc87840224dec07957","span_id":"a4e80137cbbf9edc"}
{"timestamp":"2026-11-20T14:37:24.838Z","severity":"INFO","service.name":"messenger-api","event":"http.request","logger":"Http","method":"POST","route":"/api/v1/chats/{chat_id}/messages","status":201,"duration_ms":20.5,"request_id":"5513c34d-64ea-4250-9cee-a9d9a4b12892","trace_id":"ec0813f680256f525febe0676221457b","span_id":"d20713fac541ea0b"}