-
-
Notifications
You must be signed in to change notification settings - Fork 304
Description
Support guidelines
- I've read the support guidelines
I've found a bug and checked that ...
- ... the documentation does not mention anything about my problem
- ... there are no open or closed issues that are related to my problem
Description
Hi everyone,
I'm using LibreNMS in Docker, using the officiel github repo.
I've enabled the rrdcached container with the env RRDCACHED_SERVER=rrdcached:42217.
Everything is working fine and my LibreNMS is rather fast.
Now I've been using it for a year and a half and I'm going to have to do something, because the rrd_purge 183 option doesn't work, and LNMS is using ~750GB of RRD data...
Indeed, in the doc, the mount point of librenms and rrdcached is not the same for RRD files.
I tried to put the same mount point for RRDs, LibreNMS did the cleaning, but I had problems displaying graphs:

So, I restored a snapshot to recover the graphs (yes because before trying, I had made a snapshot).
Does anyone have the solution to be able to use the rrd_purge option with rrdcached?
Or, that rrdcached itself does the cleaning.
Thanks !
Expected behaviour
Respect the rrd_purge option with rrdcached.
Actual behaviour
There is no purge at all. My LNMS is using 780Go of RRD data.
Steps to reproduce
Use LibreNMSin Docker. Follow the official doc. See the problem.
Docker info
Client: Docker Engine - Community
Version: 27.4.0
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.19.2
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.31.0
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 10
Running: 10
Paused: 0
Stopped: 0
Images: 19
Server Version: 27.4.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 88bf19b2105c8b17560993bee28a01ddc2f97182
runc version: v1.2.2-0-g7cb3632
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.1.0-28-amd64
Operating System: Debian GNU/Linux 12 (bookworm)
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.62GiB
Name: xxx
ID: xxx
Docker Root Dir: /srv/local/docker
Debug Mode: false
HTTP Proxy: http://proxy:3128/
HTTPS Proxy: http://proxy:3128/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Docker Compose config
services:
traefik:
container_name: traefik
image: traefik:latest
ports:
- 80:80
- 443:443
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "./traefik/traefik.yml:/etc/traefik/traefik.yml:ro"
- "./traefik/dynamic.yml:/etc/traefik/dynamic.yml:ro"
- "/usr/local/etc/ssl/:/etc/ssl-custom/:ro"
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.traefik-dashboard-auth.basicauth.users=traefik:xxx"
- "traefik.http.middlewares.traefik-dashboard-redirect-https.redirectscheme.scheme=https"
- "traefik.http.routers.traefik-dashboard-http.entrypoints=http"
- "traefik.http.routers.traefik-dashboard-http.rule=Host(`xxx.fqdn`)"
- "traefik.http.routers.traefik-dashboard-http.middlewares=traefik-dashboard-redirect-https"
- "traefik.http.routers.traefik-dashboard-https.entrypoints=https"
- "traefik.http.routers.traefik-dashboard-https.rule=Host(`xxx.fqdn`)"
- "traefik.http.routers.traefik-dashboard-https.tls=true"
- "traefik.http.routers.traefik-dashboard-https.service=api@internal"
- "traefik.http.routers.traefik-dashboard-https.middlewares=onlylan@file,traefik-dashboard-auth"
restart: unless-stopped
rrdcached:
image: crazymax/rrdcached
container_name: librenms_rrdcached
volumes:
- "./rrd/db:/data/db"
- "./rrd/journal:/data/journal"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "LOG_LEVEL=LOG_INFO"
- "WRITE_TIMEOUT=1800"
- "WRITE_JITTER=1800"
- "WRITE_THREADS=4"
- "FLUSH_DEAD_DATA_INTERVAL=3600"
restart: unless-stopped
db:
image: mariadb:10.5
container_name: librenms_db
command:
- "mysqld"
- "--innodb-file-per-table=1"
- "--lower-case-table-names=0"
- "--character-set-server=utf8mb4"
- "--collation-server=utf8mb4_unicode_ci"
volumes:
- "./db:/var/lib/mysql"
- "/etc/localtime:/etc/localtime:ro"
- "/etc/timezone:/etc/timezone:ro"
environment:
- "TZ=${TZ}"
- "MYSQL_ALLOW_EMPTY_PASSWORD=yes"
- "MYSQL_DATABASE=${MYSQL_DATABASE}"
- "MYSQL_USER=${MYSQL_USER}"
- "MYSQL_PASSWORD=${MYSQL_PASSWORD}"
restart: unless-stopped
redis:
image: redis:5.0-alpine
container_name: librenms_redis
environment:
- "TZ=${TZ}"
restart: unless-stopped
msmtpd:
image: crazymax/msmtpd:latest
container_name: librenms_msmtpd
env_file:
- "./msmtpd.env"
restart: unless-stopped
librenms:
image: librenms/librenms:latest
container_name: librenms
hostname: librenms
depends_on:
- db
- redis
- msmtpd
volumes:
- "./librenms:/data"
labels:
- "traefik.enable=true"
- "traefik.http.services.librenms-http8000.loadbalancer.server.port=8000"
- "traefik.http.middlewares.librenms-redirect-https.redirectscheme.scheme=https"
- "traefik.http.routers.librenms-http.entrypoints=http"
- "traefik.http.routers.librenms-http.rule=Host(`xxx.fqdn`)"
- "traefik.http.routers.librenms-http.middlewares=librenms-redirect-https"
- "traefik.http.routers.librenms-https.entrypoints=https"
- "traefik.http.routers.librenms-https.rule=Host(`xxx.fqdn`)"
- "traefik.http.routers.librenms-https.tls=true"
- "traefik.http.routers.librenms-https.service=librenms-http8000"
env_file:
- "./librenms.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=db"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
restart: unless-stopped
dispatcher:
image: librenms/librenms:latest
container_name: librenms_dispatcher
hostname: librenms-dispatcher
depends_on:
- librenms
- redis
volumes:
- "./librenms:/data"
env_file:
- "./librenms.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=db"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
- "DISPATCHER_NODE_ID=dispatcher1"
- "SIDECAR_DISPATCHER=1"
restart: unless-stopped
syslogng:
image: librenms/librenms:latest
container_name: librenms_syslog
hostname: librenms-syslogng
depends_on:
- librenms
- redis
ports:
- target: 514
published: 514
protocol: tcp
- target: 514
published: 514
protocol: udp
volumes:
- "./librenms:/data"
env_file:
- "./librenms.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=db"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
- "SIDECAR_SYSLOGNG=1"
restart: unless-stopped
logrotate:
container_name: logrotate
build:
context: './logrotate'
volumes:
- ./librenms/logs/:/var/log/librenms/:rw
- /var/run/docker.sock:/var/run/docker.sock:rw
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
depends_on:
- syslogng
restart: unless-stopped
snmptrapd:
image: librenms/librenms:latest
container_name: librenms_snmptrapd
hostname: librenms-snmptrapd
depends_on:
- librenms
- redis
ports:
- target: 162
published: 162
protocol: tcp
- target: 162
published: 162
protocol: udp
volumes:
- "./librenms:/data"
env_file:
- "./librenms.env"
environment:
- "TZ=${TZ}"
- "PUID=${PUID}"
- "PGID=${PGID}"
- "DB_HOST=db"
- "DB_NAME=${MYSQL_DATABASE}"
- "DB_USER=${MYSQL_USER}"
- "DB_PASSWORD=${MYSQL_PASSWORD}"
- "DB_TIMEOUT=60"
- "SIDECAR_SNMPTRAPD=1"
restart: unless-stoppedLogs
Soooo many logs. Send me the pattern to search.
Additional info
Env file:
MEMORY_LIMIT=8G
MAX_INPUT_VARS=1000
UPLOAD_MAX_SIZE=16M
OPCACHE_MEM_SIZE=128
REAL_IP_FROM=0.0.0.0/32
REAL_IP_HEADER=X-Forwarded-For
LOG_IP_VAR=http_x_forwarded_for
LISTEN_IPV6=false
CACHE_DRIVER=redis
SESSION_DRIVER=redis
REDIS_HOST=redis
LIBRENMS_SNMP_COMMUNITY=public
RRDCACHED_SERVER=rrdcached:42217
LIBRENMS_WEATHERMAP=false
LIBRENMS_WEATHERMAP_SCHEDULE=*/5 * * * *