Skip to content

Commit

Permalink
Cleanup compose profiles
Browse files Browse the repository at this point in the history
Removing the unused batch profile from env.
Adding the alertmanager profile to all monitoring services.
  • Loading branch information
bwbroersma committed Dec 9, 2024
1 parent 39f6078 commit b137742
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker/batch-test.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ INTERNETNL_DOMAINNAME=internet.test
# use unique name to not conflict with integration tests
COMPOSE_PROJECT_NAME=internetnl-batch-test

COMPOSE_PROFILES=batch,cron,monitoring
COMPOSE_PROFILES=cron,monitoring

ENABLE_BATCH=True

Expand Down
2 changes: 1 addition & 1 deletion docker/build.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# include all compose files
COMPOSE_FILE=docker/compose.yaml:docker/compose.build.yaml:docker/compose.development.yaml:docker/compose.integration-tests.yaml:docker/compose.test.yaml:docker/compose.tools.yaml:docker/compose.test-runner-develop.yaml:docker/compose.integration-tests.yaml
COMPOSE_PROFILES=connectiontest,cron,monitoring,routinator,batch,build
COMPOSE_PROFILES=connectiontest,cron,monitoring,routinator,build

# don't expose HTTP(S) and DNS ports to the outside, this also causes issues due to being privileged ports
WEBSERVER_PORT=80
Expand Down
9 changes: 9 additions & 0 deletions docker/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ services:
ipv4_address: $IPV4_IP_GRAFANA_INTERNAL

profiles:
- alertmanager
- monitoring

prometheus:
Expand Down Expand Up @@ -787,6 +788,7 @@ services:
- prometheus-data:/prometheus

profiles:
- alertmanager
- monitoring

alertmanager:
Expand Down Expand Up @@ -832,6 +834,7 @@ services:
- internal

profiles:
- alertmanager
- monitoring

redis-exporter:
Expand All @@ -852,6 +855,7 @@ services:
- internal

profiles:
- alertmanager
- monitoring

statsd-exporter:
Expand All @@ -876,6 +880,7 @@ services:
- statsd

profiles:
- alertmanager
- monitoring

celery-exporter:
Expand All @@ -900,6 +905,7 @@ services:
condition: service_healthy

profiles:
- alertmanager
- monitoring

# https://github.com/prometheus/node_exporter#docker
Expand Down Expand Up @@ -933,6 +939,7 @@ services:
- prometheus-textfile-directory:/prometheus-textfile-directory

profiles:
- alertmanager
- monitoring

docker_stats_exporter:
Expand All @@ -955,6 +962,7 @@ services:
- /var/run/docker.sock:/var/run/docker.sock

profiles:
- alertmanager
- monitoring

nginx_logs_exporter:
Expand All @@ -979,6 +987,7 @@ services:
- nginx-logs-exporter:/var/log/nginx/prometheus-nginxlog-exporter/

profiles:
- alertmanager
- monitoring

volumes:
Expand Down
2 changes: 1 addition & 1 deletion documentation/Docker-metrics.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Metrics

The Docker deployment includes a metrics collection system which is available on production as well as development/test environments. It consists of a Prometheus metrics server which scrapes metrics from various exporters. Grafana is provided as frontend to visualise metrics and create graphs/dashboards. The various exporters, Prometheus and Grafana containers can be disabled by not loading the `monitoring` profile, by overriding the default profiles with e.g. `COMPOSE_PROFILES=batch,cron` in `local.env`.
The Docker deployment includes a metrics collection system which is available on production as well as development/test environments. It consists of a Prometheus metrics server which scrapes metrics from various exporters. Grafana is provided as frontend to visualise metrics and create graphs/dashboards. The various exporters, Prometheus and Grafana containers can be disabled by not loading the `monitoring` profile, by overriding the default profiles with e.g. `COMPOSE_PROFILES=cron` in `local.env`.

To view metrics and graphs visit the `/grafana/` endpoint. Eg: `http://localhost:8080/grafana/` for development and `https://example.com/grafana/` for production. For development the user/password is set to `test/test`, for production users can be configured using the `MONITORING_AUTH_RAW` variable in `docker/local.env` (see `docker/defaults.env` for information).

Expand Down

0 comments on commit b137742

Please sign in to comment.