Dev 1 #1
Submodule bots/telegram-helper-bot updated: 5c2f9e501d...c8c7d50cbb
@@ -55,6 +55,8 @@ services:
|
|||||||
build: .
|
build: .
|
||||||
container_name: bots_server_monitor
|
container_name: bots_server_monitor
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "9091:9091"
|
||||||
environment:
|
environment:
|
||||||
- TELEGRAM_BOT_TOKEN=${TELEGRAM_MONITORING_BOT_TOKEN}
|
- TELEGRAM_BOT_TOKEN=${TELEGRAM_MONITORING_BOT_TOKEN}
|
||||||
- GROUP_FOR_LOGS=${GROUP_MONITORING_FOR_LOGS}
|
- GROUP_FOR_LOGS=${GROUP_MONITORING_FOR_LOGS}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ class MetricsCollector:
|
|||||||
|
|
||||||
# PID файлы для отслеживания процессов
|
# PID файлы для отслеживания процессов
|
||||||
self.pid_files = {
|
self.pid_files = {
|
||||||
'voice_bot': 'voice_bot.pid',
|
#'voice_bot': 'voice_bot.pid',
|
||||||
'helper_bot': 'helper_bot.pid'
|
'helper_bot': 'helper_bot.pid'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ scrape_configs:
|
|||||||
|
|
||||||
- job_name: 'telegram-helper-bot'
|
- job_name: 'telegram-helper-bot'
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets: ['bots_telegram_bot:8080'] # Имя контейнера из docker-compose
|
- targets: ['host.docker.internal:8080'] # Локальный бот на порту 8080
|
||||||
labels:
|
labels:
|
||||||
bot_name: 'telegram-helper-bot'
|
bot_name: 'telegram-helper-bot'
|
||||||
environment: 'production'
|
environment: 'production'
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ from datetime import datetime
|
|||||||
# Добавляем путь к модулям мониторинга
|
# Добавляем путь к модулям мониторинга
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../infra/monitoring'))
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../infra/monitoring'))
|
||||||
|
|
||||||
from metrics_collector import MetricsCollector
|
from infra.monitoring.metrics_collector import MetricsCollector
|
||||||
|
|
||||||
|
|
||||||
class TestMetricsCollector:
|
class TestMetricsCollector:
|
||||||
|
|||||||
Reference in New Issue
Block a user