Persistence not working

Before you post: Your responses to these questions will help the community help you. Please complete this template if you’re asking a support question.
Don’t forget to select tags to help index your topic!

1. Describe your incident:
Persistent not working new setup docker, volumes are not created in the path listed in the yml file. They are created in var/lib/docker. Every time I do docker-compose down and restart the data in the logs is gone. The settings remain but the log data is gone.

2. Describe your environment:

  • OS Information: ubuntu 22.04.1 LTS

  • Package Version: latest docker, graylog 5.0, mongo 5.0.13, opensearch 2.4.0

  • Service logs, configurations, and environment variables:
    here is the yml file

version: ‘3.8’

services:

mongo:
image: mongo:5.0.13
volumes:

  • mongo_data:/data/db
    networks:
    - graylog
    restart: always

opensearch:
image: opensearchproject/opensearch:2.4.0
volumes:

  • op_data:/usr/share/graylog/openseach
    environment:
  • OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m
  • bootstrap.memory_lock=true
  • discovery.type=single-node
  • action.auto_create_index=false
  • plugins.security.ssl.http.enabled=false
  • plugins.security.disabled=true
  • hostname:opensearch

ulimits:
memlock:
hard: -1
soft: -1
networks:

  • graylog
    restart: always

graylog:
image: graylog/graylog:5.0
volumes:

  • graylog_data:/usr/share/graylog/data
  • graylog_journal:/usr/share/graylog/data/journal
  • “graylogconfig:/usr/share/graylog/data/config”
    environment:

CHANGE ME (must be at least 16 characters)!

  • GRAYLOG_PASSWORD_SECRET=AlfaOmega1graylog
  • GRAYLOG_ALLOW_LEADING_WILDCARD_SEARCHES=true
  • GRAYLOG_ALLOW_HIGHLIGHTING=true

Password: admin

  • GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918

- GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000

  • GRAYLOG_ELASTICSEARCH_HOSTS=http://opensearch:9200
  • GRAYLOG_HTTP_EXTERNAL_URI=
  • TZ=America/New_York
  • GRAYLOG_ROOT_TIMEZONE=America/New_York
  • GRAYLOG_TIMEZONE=America/New_York
  • GRAYLOG_TRANSPORT_EMAIL_ENABLED=true
  • GRAYLOG_TRANSPORT_EMAIL_HOSTNAME=100.100.1.4
  • GRAYLOG_TRANSPORT_EMAIL_PORT=25
  • GRAYLOG_TRANSPORT_EMAIL_USE_AUTH=false
  • GRAYLOG_TRANSPORT_EMAIL_USE_TLS=false
  • GRAYLOG_TRANSPORT_EMAIL_USE_SSL=false
    entrypoint: /usr/bin/tini – wait-for-it opensearch:9200 – /docker-entrypoint.sh
    networks:
  • graylog

Links MongoDB with OpenSearch.

links:
- mongo:mongo
- opensearch
restart: always

depends_on:
- opensearch
- mongo

ports:

Graylog web interface and REST API

  • 9000:9000

Syslog TCP

  • 1514:1514

Syslog UDP

  • 1514:1514/udp

GELF TCP

  • 12201:12201

GELF UDP

  • 12201:12201/udp

CEF UPD

  • 5555:5555/udp
    networks:
    graylog:
    driver: bridge
    volumes:
    mongo_data:

driver: local

op_data:

driver: local

graylog_data:

driver: local

graylog_journal:

driver: local

graylogconfig:

driver: local

3. What steps have you already taken to try and solve the problem?
I have tried different syntaxes, also chmod 777 the desired base path in the yml file.

4. How can the community help?
I am new to docker. This is my second setup. I can’t figure out why the persistence is not working, and the volumes are not created outside the docker path. Any help would be great.

Thank you,

Helpful Posting Tips: Tips for Posting Questions that Get Answers [Hold down CTRL and link on link to open tips documents in a separate tab]

I got it figured out.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.