Management json.log too big #1157

Closed
opened 2025-11-20 05:25:00 -05:00 by saavagebueno · 1 comment
Owner

Originally created by @hagianghi on GitHub (Aug 15, 2024).

Describe the problem

json.log in Management container too big (54GB)

To Reproduce

Steps to reproduce the behavior:

  1. Go to '/var/lib/docker/containers/dc0c6adf3e5b465bcdf5d7292c8ca1c0b5e75caa2b4e894fa9d26d20b6dee320'
  2. Click on 'ls -lh'
  3. Scroll down to 'check file json.log'

Expected behavior

this log file grow fast (1GB after 24h)

Are you using NetBird Cloud?

I'm using self-hosted netbird

Screenshots

image

Additional context

my docker-compose.yml

version: "3.4"
services:

Caddy reverse proxy

caddy:
image: caddy
restart: unless-stopped
networks: [ netbird ]
ports:
- '443:443'
- '80:80'
- '8080:8080'
volumes:
- netbird_caddy_data:/data
- ./Caddyfile:/etc/caddy/Caddyfile
#UI dashboard
dashboard:
image: netbirdio/dashboard:latest
restart: unless-stopped
networks: [netbird]
env_file:
- ./dashboard.env
logging:
driver: "json-file"
options:
max-size: "500m"
max-file: "2"

Signal

signal:
image: netbirdio/signal:latest
restart: unless-stopped
networks: [netbird]
logging:
driver: "json-file"
options:
max-size: "500m"
max-file: "2"

Management

management:
image: netbirdio/management:latest
restart: unless-stopped
networks: [netbird]
volumes:
- netbird_management:/var/lib/netbird
- ./management.json:/etc/netbird/management.json
command: [
"--port", "80",
"--log-file", "console",
"--log-level", "info",
"--disable-anonymous-metrics=false",
"--single-account-mode-domain=xxx-international.xxx",
"--dns-domain=xxx-international.xxx",
"--idp-sign-key-refresh-enabled",
]
logging:
driver: "json-file"
options:
max-size: "500m"
max-file: "2"

Coturn, AKA relay server

coturn:
image: coturn/coturn
restart: unless-stopped
domainname: netbird.relay.selfhosted
volumes:
- ./turnserver.conf:/etc/turnserver.conf:ro
network_mode: host
command:
- -c /etc/turnserver.conf
logging:
driver: "json-file"
options:
max-size: "500m"
max-file: "2"

Zitadel - identity provider

zitadel:
restart: 'always'
networks: [netbird]
image: 'ghcr.io/zitadel/zitadel:v2.31.3'
command: 'start-from-init --masterkeyFromEnv --tlsMode external'
env_file:
- ./zitadel.env
depends_on:
crdb:
condition: 'service_healthy'
volumes:
- ./machinekey:/machinekey
- netbird_zitadel_certs:/crdb-certs:ro
logging:
driver: "json-file"
options:
max-size: "500m"
max-file: "2"

CockroachDB for zitadel

crdb:
restart: 'always'
networks: [netbird]
image: 'cockroachdb/cockroach:v22.2.2'
command: 'start-single-node --advertise-addr crdb'
volumes:
- netbird_crdb_data:/cockroach/cockroach-data
- netbird_crdb_certs:/cockroach/certs
- netbird_zitadel_certs:/zitadel-certs
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/health?ready=1" ]
interval: '10s'
timeout: '30s'
retries: 5
start_period: '20s'
logging:
driver: "json-file"
options:
max-size: "500m"
max-file: "2"

volumes:
netbird_management:
netbird_caddy_data:
netbird_crdb_data:
netbird_crdb_certs:
netbird_zitadel_certs:

networks:
netbird:

Originally created by @hagianghi on GitHub (Aug 15, 2024). **Describe the problem** json.log in Management container too big (54GB) **To Reproduce** Steps to reproduce the behavior: 1. Go to '/var/lib/docker/containers/dc0c6adf3e5b465bcdf5d7292c8ca1c0b5e75caa2b4e894fa9d26d20b6dee320' 2. Click on 'ls -lh' 3. Scroll down to 'check file json.log' **Expected behavior** this log file grow fast (1GB after 24h) **Are you using NetBird Cloud?** I'm using self-hosted netbird **Screenshots** ![image](https://github.com/user-attachments/assets/71819faa-0a49-4756-a1ae-32e4c7e75ea5) **Additional context** my docker-compose.yml version: "3.4" services: # Caddy reverse proxy caddy: image: caddy restart: unless-stopped networks: [ netbird ] ports: - '443:443' - '80:80' - '8080:8080' volumes: - netbird_caddy_data:/data - ./Caddyfile:/etc/caddy/Caddyfile #UI dashboard dashboard: image: netbirdio/dashboard:latest restart: unless-stopped networks: [netbird] env_file: - ./dashboard.env logging: driver: "json-file" options: max-size: "500m" max-file: "2" # Signal signal: image: netbirdio/signal:latest restart: unless-stopped networks: [netbird] logging: driver: "json-file" options: max-size: "500m" max-file: "2" # Management management: image: netbirdio/management:latest restart: unless-stopped networks: [netbird] volumes: - netbird_management:/var/lib/netbird - ./management.json:/etc/netbird/management.json command: [ "--port", "80", "--log-file", "console", "--log-level", "info", "--disable-anonymous-metrics=false", "--single-account-mode-domain=xxx-international.xxx", "--dns-domain=xxx-international.xxx", "--idp-sign-key-refresh-enabled", ] logging: driver: "json-file" options: max-size: "500m" max-file: "2" # Coturn, AKA relay server coturn: image: coturn/coturn restart: unless-stopped domainname: netbird.relay.selfhosted volumes: - ./turnserver.conf:/etc/turnserver.conf:ro network_mode: host command: - -c /etc/turnserver.conf logging: driver: "json-file" options: max-size: "500m" max-file: "2" # Zitadel - identity provider zitadel: restart: 'always' networks: [netbird] image: 'ghcr.io/zitadel/zitadel:v2.31.3' command: 'start-from-init --masterkeyFromEnv --tlsMode external' env_file: - ./zitadel.env depends_on: crdb: condition: 'service_healthy' volumes: - ./machinekey:/machinekey - netbird_zitadel_certs:/crdb-certs:ro logging: driver: "json-file" options: max-size: "500m" max-file: "2" # CockroachDB for zitadel crdb: restart: 'always' networks: [netbird] image: 'cockroachdb/cockroach:v22.2.2' command: 'start-single-node --advertise-addr crdb' volumes: - netbird_crdb_data:/cockroach/cockroach-data - netbird_crdb_certs:/cockroach/certs - netbird_zitadel_certs:/zitadel-certs healthcheck: test: [ "CMD", "curl", "-f", "http://localhost:8080/health?ready=1" ] interval: '10s' timeout: '30s' retries: 5 start_period: '20s' logging: driver: "json-file" options: max-size: "500m" max-file: "2" volumes: netbird_management: netbird_caddy_data: netbird_crdb_data: netbird_crdb_certs: netbird_zitadel_certs: networks: netbird:
saavagebueno added the triage-needed label 2025-11-20 05:25:00 -05:00
Author
Owner

@hagianghi commented on GitHub (Aug 21, 2024):

done now, just clear docker logs
sudo sh -c 'truncate -s 0 /var/lib/docker/containers//-json.log'

@hagianghi commented on GitHub (Aug 21, 2024): done now, just clear docker logs sudo sh -c 'truncate -s 0 /var/lib/docker/containers/*/*-json.log'
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1157