v0.18.0
🇷🇺 Что нового (RU)
Что решает этот релиз
- Встроенный Prometheus-эндпоинт — мониторинг прокси без парсинга логов и внешних экспортёров.
- Установка дашборда больше не ломается на Debian 12+ / Ubuntu 23.04+ из-за PEP 668 (
externally-managed-environment).
Что изменено
-
Prometheus
/metricsendpoint (#179)- Новая секция
[metrics]вconfig.toml(enabled,host,port). - Прокси поднимает отдельный HTTP-listener и отдаёт метрики в Prometheus text format.
- Глобальные метрики: активные подключения, handshakes in flight, accepted/closed totals, drop-счётчики, трафик (C2S/S2C bytes).
- Per-user метрики:
mtproto_user_connections_active,mtproto_user_*_bytes_total— по настроенным пользователям. - Метрики процесса: RSS, VSZ, CPU, open FDs.
- cgroup-метрики (опциональные):
mtproto_cgroup_memory_usage_bytes,mtproto_cgroup_memory_limit_bytes— для Docker/контейнеров. - Готовый Grafana-дашборд (
hack/docker/grafana-dashboard.json) + Docker Compose стек (Prometheus + Grafana). - Документация в
hack/docker/README.md.
- Новая секция
-
Dashboard: pip3 → uv (#185, #189)
pip3 installзаменён наuv— быстрый менеджер Python-пакетов.- Зависимости ставятся в изолированный virtualenv (
/opt/mtproto-proxy/monitor/.venv), а не в системный Python. - Если
uvне установлен — скачивается автоматически через официальныйastral.sh/uv/install.sh. - Systemd-сервис
proxy-monitorтеперь запускаетserver.pyчерез.venv/bin/python. - Убрана зависимость от
python3-pip.
Important
Для обновления дашборда на существующих серверах:
sudo mtbuddy update # обновить бинарь
sudo mtbuddy setup dashboard # переустановить дашборд (создаст venv через uv)🇬🇧 Release notes (EN)
What this release addresses
- Built-in Prometheus metrics — monitor the proxy without log parsing or external exporters.
- Dashboard installation no longer breaks on Debian 12+ / Ubuntu 23.04+ due to PEP 668 (
externally-managed-environment).
What changed
-
Prometheus
/metricsendpoint (#179)- New
[metrics]config section (enabled,host,port). - The proxy starts a dedicated HTTP listener serving metrics in Prometheus text format.
- Global metrics: active connections, handshakes in flight, accepted/closed totals, drop counters, C2S/S2C traffic bytes.
- Per-user metrics:
mtproto_user_connections_active,mtproto_user_*_bytes_total— keyed by configured users. - Process metrics: RSS, VSZ, CPU seconds, open/max FDs.
- Optional cgroup metrics:
mtproto_cgroup_memory_usage_bytes,mtproto_cgroup_memory_limit_bytes— appear automatically in containers. - Ready-to-import Grafana dashboard (
hack/docker/grafana-dashboard.json) + Docker Compose stack (Prometheus + Grafana). - Docs at
hack/docker/README.md.
- New
-
Dashboard: pip3 → uv (#185, #189)
- Replaced
pip3 installwithuvfor Python dependency management. - Dependencies are installed into an isolated virtualenv (
/opt/mtproto-proxy/monitor/.venv) instead of the system Python. - If
uvis not present, it is bootstrapped automatically via the officialastral.sh/uv/install.shinstaller. - The
proxy-monitorsystemd service now runsserver.pyvia.venv/bin/python. - Removed
python3-pipprerequisite.
- Replaced
Important
To update the dashboard on existing servers:
sudo mtbuddy update # update the binary
sudo mtbuddy setup dashboard # redeploy dashboard (creates venv via uv)