✨ 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:
+16
-5
@@ -133,15 +133,26 @@ services:
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:v2.53.0
|
||||
command:
|
||||
- "--config.file=/etc/prometheus/prometheus.yml"
|
||||
- "--storage.tsdb.path=/prometheus"
|
||||
- "--web.enable-lifecycle"
|
||||
- "--storage.tsdb.retention.time=1h"
|
||||
entrypoint:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
MONITORING_ADDR=$${CAATSM_MONITORING_ADDR:-host.docker.internal:2112}
|
||||
mkdir -p /etc/prometheus/targets
|
||||
echo "[{\"labels\":{\"job\":\"caatsm-receiver\",\"instance\":\"$$MONITORING_ADDR\"},\"targets\":[\"$$MONITORING_ADDR\"]}]" > /etc/prometheus/targets/caatsm-receiver.json
|
||||
exec /bin/prometheus \
|
||||
--config.file=/etc/prometheus/prometheus.yml \
|
||||
--storage.tsdb.path=/prometheus \
|
||||
--web.enable-lifecycle \
|
||||
--storage.tsdb.retention.time=1h
|
||||
environment:
|
||||
# Default monitoring address, can be overridden via .env file or docker-compose override
|
||||
CAATSM_MONITORING_ADDR: ${CAATSM_MONITORING_ADDR:-host.docker.internal:2112}
|
||||
ports:
|
||||
- "9090:9090"
|
||||
volumes:
|
||||
- ./configs/prometheus.dev.yml:/etc/prometheus/prometheus.yml:ro
|
||||
- ./configs/prometheus/targets:/etc/prometheus/targets
|
||||
networks:
|
||||
- devnet
|
||||
|
||||
|
||||
Reference in New Issue
Block a user