Update Prometheus configuration and enhance monitoring capabilities. Refactor docker-compose.dev.yml to dynamically generate target configurations for the CAATSM receiver. Modify Makefile and Taskfile to allow setting the monitoring address via environment variables. Update observability settings in config.dev.toml and Prometheus scrape configurations to improve integration with the monitoring stack. Enhance CLI options for monitoring address and disable monitoring features as needed.

This commit is contained in:
windyboy
2025-11-17 17:53:24 +08:00
parent 704c7b80f6
commit 61647cf849
12 changed files with 181 additions and 38 deletions
+9 -4
View File
@@ -6,14 +6,19 @@ scrape_configs:
- job_name: "otel-collector"
static_configs:
- targets:
- "otel-collector:8888"
- "otel-collector:8889"
- job_name: "nats-exporter"
static_configs:
- targets:
- "nats-exporter:7777"
- job_name: "caatsm-receiver"
static_configs:
- targets:
- 172.23.189.12:2112
file_sd_configs:
# CAATSM_MONITORING_ADDR is set via environment variable in docker-compose
# Default: host.docker.internal:2112 (for Docker Desktop on Mac/Windows)
# Can be overridden: e.g., 10.16.66.236:2112 or 172.17.0.1:2112
# Target file is dynamically generated in docker-compose entrypoint
- files:
- "/etc/prometheus/targets/caatsm-receiver.json"
refresh_interval: 5s