From cd42c6454418b40a1fbe91a9d0e123a4f1a5e14b Mon Sep 17 00:00:00 2001 From: p4u1 Date: Fri, 21 Feb 2025 17:21:46 +0100 Subject: [PATCH] feat: Adds option to expose ports for node and cadvisor service --- .env.sample | 3 +++ README.md | 8 +++++++- compose.expose-ports.yml | 13 +++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 compose.expose-ports.yml diff --git a/.env.sample b/.env.sample index e65805a..95af3d6 100644 --- a/.env.sample +++ b/.env.sample @@ -12,6 +12,9 @@ ENABLE_BACKUPS=true # COMPOSE_FILE="$COMPOSE_FILE:compose.promtail.yml" # LOKI_PUSH_URL=https://loki.monitoring.example.org/loki/api/v1/push +## Expose node and cadvisor ports instead of traefik +# COMPOSE_FILE="$COMPOSE_FILE:compose.expose-ports.yml" + # Monitoring Server # ## Prometheus diff --git a/README.md b/README.md index 439b980..b64ea68 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,13 @@ Where gathering.org is the node you want to gather metrics from. - cadvisor.monitoring.gathering.org - node.monitoring.gathering.org +### Expose node and cadvisor via ports instead of traefik + +In case you have no traefik running on the machine, you can expose the ports directly by uncommenting the following line: +``` +# COMPOSE_FILE="$COMPOSE_FILE:compose.expose-ports.yml" +``` + ## Setup Metrics Browser @@ -85,7 +92,6 @@ Where gathering.org is the node you want to gather metrics from. | Cadvisor | traefik basic-auth | cadvisor.monitoring.example.org | | Node Exporter | traefik basic-auth | node.monitoring.example.org | - ### Logging from a docker host to loki server without anything else ``` diff --git a/compose.expose-ports.yml b/compose.expose-ports.yml new file mode 100644 index 0000000..d280c05 --- /dev/null +++ b/compose.expose-ports.yml @@ -0,0 +1,13 @@ +--- +version: "3.8" + +services: + app: + ports: + - "9100:9100" + deploy: + + cadvisor: + ports: + - "9101:8080" + deploy: