Каталог метрик
Подробный справочник всех метрик, доступных в Prometheus/Grafana.
VPN Config Service (10.99.87.249:8000/metrics)
Серверы и клиенты
| Метрика |
Тип |
Описание |
vpn_config_servers_active |
gauge |
Активных серверов |
vpn_config_clients_total |
gauge |
Всего клиентов в PostgreSQL |
vpn_config_clients_online |
gauge |
Уникальных клиентов online |
vpn_config_clients_blocked |
gauge |
Заблокированных |
vpn_config_inbounds_total |
gauge |
Всего inbounds |
vpn_config_fill_added_total |
counter |
Добавлено конфигов fill_configs |
vpn_config_sync_errors_total |
counter |
Ошибки sync |
Per-Server (labels: hostname, location)
| Метрика |
Тип |
Описание |
vpn_server_online_sessions |
gauge |
Online IP-сессии |
vpn_server_tcp_connections |
gauge |
TCP коннекты |
vpn_server_bandwidth_tx_mbps |
gauge |
Bandwidth TX Mbps |
vpn_server_health_status |
gauge |
0=DOWN, 1=DEGRADED, 2=HEALTHY |
vpn_server_load_avg |
gauge |
Load average (period=1m/5m) |
vpn_server_memory_used_percent |
gauge |
RAM % |
vpn_port_rx_bytes |
gauge |
RX bytes per port |
Online Totals
| Метрика |
Тип |
Описание |
vpn_online_total_sessions |
gauge |
Всего IP-сессий |
vpn_online_unique_accounts |
gauge |
Уникальных аккаунтов |
vpn_online_new_connections |
gauge |
Новых подключений за 120с |
vpn_online_tcp_total |
gauge |
Сумма TCP |
vpn_online_activity_level{level} |
gauge |
idle/low/moderate/high |
vpn_online_by_country{country_code} |
gauge |
Top-20 стран |
Sync Health
| Метрика |
Тип |
Описание |
vpn_sync_last_age_seconds{sync_type} |
gauge |
Секунд с последнего sync |
vpn_sync_last_duration_ms{sync_type} |
gauge |
Длительность sync в ms |
vpn_sync_servers_failed |
gauge |
Серверы с ошибками |
vpn_worker_healthy |
gauge |
1=OK, 0=stale (>15 мин) |
Worker собирает данные каждые 60с (online_sync) и 30мин (full_sync) через SSH к XUI серверам.
Backend App (10.99.87.249:8080/actuator/prometheus)
Custom (MetricsConfig.java)
| Метрика |
Тип |
Описание |
account_pool_size |
gauge |
Текущий размер пула |
account_pool_min |
gauge |
Минимальный порог (100) |
account_pool_target |
gauge |
Целевой размер (500) |
Auto-exposed (Spring Boot Micrometer)
| Группа |
Примеры |
Описание |
jvm_memory_* |
used, committed, max |
Heap/Non-heap memory |
jvm_gc_* |
pause, live_data_size |
GC метрики |
jvm_threads_* |
live, peak, daemon |
Потоки JVM |
hikaricp_* |
active, idle, pending |
DB connection pool |
http_server_requests_* |
count, sum |
HTTP запросы (по uri/status/method) |
process_* |
cpu, uptime, open_files |
Системные метрики |
Node Exporter (*:9100)
Развёрнут на: VPN серверах, WL proxies, monitoring server.
| Метрика |
Описание |
node_cpu_seconds_total |
CPU usage |
node_memory_MemTotal_bytes / MemAvailable_bytes |
RAM |
node_filesystem_avail_bytes |
Свободное место |
node_network_receive/transmit_bytes_total |
Сетевой трафик |
node_load1 / node_load5 |
Load average |
node_boot_time_seconds |
Uptime |
Exporters
| Exporter |
Хост |
Метрики |
| MySQL Exporter |
10.99.87.62:9104 |
mysql_global_status_*, mysql_slave_status |
| Redis Exporter |
10.99.87.249:9121 |
redis_connected_clients, redis_used_memory |
| Blackbox Exporter |
10.99.87.5 |
probe_success, probe_duration_seconds |
PostgreSQL таблицы (Grafana SQL datasource)
| Таблица |
Ключевые поля |
Dashboard |
online_sessions |
client_id, server_id, client_ip, tcp_count |
Online, Abuse |
online_history |
timestamp, total_online, unique_accounts |
Online History |
traffic_hourly |
client_id, server_id, traffic_up/down |
Traffic |
client_ips |
client_id, ip, country_code, city |
Abuse |
servers |
hostname, ip, health_status, load_avg |
Servers |
sync_runs |
sync_type, duration_ms, started_at |
Service Health |
clients |
account_id, total_traffic_bytes, is_blocked |
Account lookup |
MySQL таблицы (Grafana SQL datasource)
| Таблица |
Ключевые поля |
Бизнес-метрика |
accounts |
account, pay_status, valid_to, rate |
Подписки, retention |
payments |
amount, status, provider, created_at |
Revenue, конверсия |
trial_requests |
device_id, created_at |
Trial воронка |
device_info |
platform, app_version |
Устройства |
server |
ip, country, is_active, panel_type |
Инфраструктура |
См. также:
Мониторинг ·
VPN Config Service ·
Архитектура бэкенда