Graylog #4

Open
opened 2025-03-28 14:41:28 +01:00 by heavy · 0 comments
Owner
# For DataNode setup, graylog starts with a preflight UI, this is a change from just using OpenSearch/Elasticsearch.
# Please take a look at the README at the top of this repo or the regular docs for more info.

services:
  mongodb:
    image: mongo:5.0
    container_name: mongodb
    volumes:
      - "mongodb_data:/data/db"
    restart: "on-failure"
    networks:
      - oase

  # For DataNode setup, graylog starts with a preflight UI, this is a change from just using OpenSearch/Elasticsearch.
  # Please take a look at the README at the top of this repo or the regular docs for more info.
  datanode:
    image: graylog/graylog-datanode:6.1
    container_name: datanode
    hostname: "datanode"
    environment:
      GRAYLOG_DATANODE_NODE_ID_FILE: "/var/lib/graylog-datanode/node-id"
      # GRAYLOG_DATANODE_PASSWORD_SECRET and GRAYLOG_PASSWORD_SECRET MUST be the same value
      GRAYLOG_DATANODE_PASSWORD_SECRET: "${GRAYLOG_PASSWORD_SECRET:?Please configure GRAYLOG_PASSWORD_SECRET in the .env file}"
      GRAYLOG_DATANODE_MONGODB_URI: "mongodb://mongodb:27017/graylog"
        #GRAYLOG_DATANODE_MONGODB_URI: "mongodb://10.89.0.12:27017/graylog"
    ulimits:
      memlock:
        hard: -1
        soft: -1
      nofile:
        soft: 65536
        hard: 65536
    ports:
      - "8999:8999/tcp"   # DataNode API
      - "9200:9200/tcp"
      - "9300:9300/tcp"
    volumes:
      - "graylog-datanode:/var/lib/graylog-datanode"
    restart: "on-failure"
    networks:
      - oase

  graylog:
    image: graylog/graylog:6.1
    container_name: graylog
    depends_on:
      mongodb:
        condition: "service_started"
    entrypoint: "/usr/bin/tini --  /docker-entrypoint.sh"
    environment:
      GRAYLOG_NODE_ID_FILE: "/usr/share/graylog/data/data/node-id"
      # GRAYLOG_DATANODE_PASSWORD_SECRET and GRAYLOG_PASSWORD_SECRET MUST be the same value
      GRAYLOG_PASSWORD_SECRET: "${GRAYLOG_PASSWORD_SECRET:?Please configure GRAYLOG_PASSWORD_SECRET in the .env file}"
      GRAYLOG_ROOT_PASSWORD_SHA2: "${GRAYLOG_ROOT_PASSWORD_SHA2:?Please configure GRAYLOG_ROOT_PASSWORD_SHA2 in the .env file}"
      GRAYLOG_HTTP_BIND_ADDRESS: "0.0.0.0:9000"
      GRAYLOG_HTTP_EXTERNAL_URI: "http://localhost:9000/"
        #GRAYLOG_MONGODB_URI: "mongodb://10.89.0.12:27017/graylog"
      GRAYLOG_MONGODB_URI: "mongodb://mongodb:27017/graylog"
    ports:
    - "5044:5044/tcp"   # Beats
    - "5140:5140/udp"   # Syslog
    - "5140:5140/tcp"   # Syslog
    - "5555:5555/tcp"   # RAW TCP
    - "5555:5555/udp"   # RAW UDP
    - "9050:9000/tcp"   # Server API
    - "12201:12201/tcp" # GELF TCP
    - "12201:12201/udp" # GELF UDP
    #- "10000:10000/tcp" # Custom TCP port
    #- "10000:10000/udp" # Custom UDP port
    - "13301:13301/tcp" # Forwarder data
    - "13302:13302/tcp" # Forwarder config
    volumes:
      - "graylog_data:/usr/share/graylog/data/data"
      - "graylog_journal:/usr/share/graylog/data/journal"
    restart: "on-failure"
    networks:
      - oase

volumes:
  mongodb_data:
  graylog-datanode:
  graylog_data:
  graylog_journal:

networks:
  oase:
    external: true
``` # For DataNode setup, graylog starts with a preflight UI, this is a change from just using OpenSearch/Elasticsearch. # Please take a look at the README at the top of this repo or the regular docs for more info. services: mongodb: image: mongo:5.0 container_name: mongodb volumes: - "mongodb_data:/data/db" restart: "on-failure" networks: - oase # For DataNode setup, graylog starts with a preflight UI, this is a change from just using OpenSearch/Elasticsearch. # Please take a look at the README at the top of this repo or the regular docs for more info. datanode: image: graylog/graylog-datanode:6.1 container_name: datanode hostname: "datanode" environment: GRAYLOG_DATANODE_NODE_ID_FILE: "/var/lib/graylog-datanode/node-id" # GRAYLOG_DATANODE_PASSWORD_SECRET and GRAYLOG_PASSWORD_SECRET MUST be the same value GRAYLOG_DATANODE_PASSWORD_SECRET: "${GRAYLOG_PASSWORD_SECRET:?Please configure GRAYLOG_PASSWORD_SECRET in the .env file}" GRAYLOG_DATANODE_MONGODB_URI: "mongodb://mongodb:27017/graylog" #GRAYLOG_DATANODE_MONGODB_URI: "mongodb://10.89.0.12:27017/graylog" ulimits: memlock: hard: -1 soft: -1 nofile: soft: 65536 hard: 65536 ports: - "8999:8999/tcp" # DataNode API - "9200:9200/tcp" - "9300:9300/tcp" volumes: - "graylog-datanode:/var/lib/graylog-datanode" restart: "on-failure" networks: - oase graylog: image: graylog/graylog:6.1 container_name: graylog depends_on: mongodb: condition: "service_started" entrypoint: "/usr/bin/tini -- /docker-entrypoint.sh" environment: GRAYLOG_NODE_ID_FILE: "/usr/share/graylog/data/data/node-id" # GRAYLOG_DATANODE_PASSWORD_SECRET and GRAYLOG_PASSWORD_SECRET MUST be the same value GRAYLOG_PASSWORD_SECRET: "${GRAYLOG_PASSWORD_SECRET:?Please configure GRAYLOG_PASSWORD_SECRET in the .env file}" GRAYLOG_ROOT_PASSWORD_SHA2: "${GRAYLOG_ROOT_PASSWORD_SHA2:?Please configure GRAYLOG_ROOT_PASSWORD_SHA2 in the .env file}" GRAYLOG_HTTP_BIND_ADDRESS: "0.0.0.0:9000" GRAYLOG_HTTP_EXTERNAL_URI: "http://localhost:9000/" #GRAYLOG_MONGODB_URI: "mongodb://10.89.0.12:27017/graylog" GRAYLOG_MONGODB_URI: "mongodb://mongodb:27017/graylog" ports: - "5044:5044/tcp" # Beats - "5140:5140/udp" # Syslog - "5140:5140/tcp" # Syslog - "5555:5555/tcp" # RAW TCP - "5555:5555/udp" # RAW UDP - "9050:9000/tcp" # Server API - "12201:12201/tcp" # GELF TCP - "12201:12201/udp" # GELF UDP #- "10000:10000/tcp" # Custom TCP port #- "10000:10000/udp" # Custom UDP port - "13301:13301/tcp" # Forwarder data - "13302:13302/tcp" # Forwarder config volumes: - "graylog_data:/usr/share/graylog/data/data" - "graylog_journal:/usr/share/graylog/data/journal" restart: "on-failure" networks: - oase volumes: mongodb_data: graylog-datanode: graylog_data: graylog_journal: networks: oase: external: true ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: heavy/dotfiles#4
No description provided.