refactor: update Docker setup and remove deprecated monitoring components
- Replace curl with wget in healthcheck commands for better reliability. - Remove server_monitor service and related configurations from docker-compose. - Update Dockerfile to use a multi-stage build for optimized image size. - Delete obsolete Dockerfile.optimized and related monitoring scripts. - Clean up Makefile by removing commands related to the server_monitor service. - Update README to reflect changes in monitoring services and commands.
This commit is contained in:
@@ -9,8 +9,6 @@ import sys
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Добавляем путь к модулям мониторинга
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../../infra/monitoring'))
|
||||
|
||||
|
||||
class TestPrometheusConfig:
|
||||
@@ -80,38 +78,6 @@ class TestPrometheusConfig:
|
||||
targets = static_configs[0].get('targets', [])
|
||||
assert 'localhost:9090' in targets, "Prometheus should scrape localhost:9090"
|
||||
|
||||
def test_infrastructure_job(self, prometheus_config):
|
||||
"""Тест job для инфраструктуры"""
|
||||
scrape_configs = prometheus_config['scrape_configs']
|
||||
|
||||
# Ищем job для infrastructure
|
||||
infra_job = None
|
||||
for job in scrape_configs:
|
||||
if job.get('job_name') == 'infrastructure':
|
||||
infra_job = job
|
||||
break
|
||||
|
||||
assert infra_job is not None, "Should have infrastructure job"
|
||||
|
||||
# Проверяем основные параметры
|
||||
assert 'static_configs' in infra_job, "Infrastructure job should have static_configs"
|
||||
assert 'metrics_path' in infra_job, "Infrastructure job should have metrics_path"
|
||||
assert 'scrape_interval' in infra_job, "Infrastructure job should have scrape_interval"
|
||||
assert 'scrape_timeout' in infra_job, "Infrastructure job should have scrape_timeout"
|
||||
assert 'honor_labels' in infra_job, "Infrastructure job should have honor_labels"
|
||||
|
||||
# Проверяем значения
|
||||
assert infra_job['metrics_path'] == '/metrics', "Metrics path should be /metrics"
|
||||
assert infra_job['scrape_interval'] == '30s', "Scrape interval should be 30s"
|
||||
assert infra_job['scrape_timeout'] == '10s', "Scrape timeout should be 10s"
|
||||
assert infra_job['honor_labels'] is True, "honor_labels should be True"
|
||||
|
||||
# Проверяем targets
|
||||
static_configs = infra_job['static_configs']
|
||||
assert len(static_configs) > 0, "Should have at least one static config"
|
||||
|
||||
targets = static_configs[0].get('targets', [])
|
||||
assert 'bots_server_monitor:9091' in targets, "Should scrape bots_server_monitor:9091"
|
||||
|
||||
def test_telegram_bot_job(self, prometheus_config):
|
||||
"""Тест job для telegram-helper-bot"""
|
||||
|
||||
Reference in New Issue
Block a user