Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email configuration doesn't apply #47

Closed
andrepaulotek opened this issue Nov 30, 2023 · 1 comment
Closed

Email configuration doesn't apply #47

andrepaulotek opened this issue Nov 30, 2023 · 1 comment
Assignees
Labels
bug Something isn't working triaged

Comments

@andrepaulotek
Copy link

Hello! I'm using the docker composer from open-core.

Initially I configured it without email support, but now I need to add those configurations.

When I try to send a test email I get the error: Notification has email recipients and is triggered, but email transport is not configured. Email transport is not enabled in server configuration file!

I've tried adding the following to the .env file:

GRAYLOG_TRANSPORT_EMAIL_PROTOCOL="smtp"
GRAYLOG_TRANSPORT_EMAIL_WEB_INTERFACE_URL="https://192.168.1.1/"
GRAYLOG_TRANSPORT_EMAIL_HOSTNAME="smtp.example.com"
GRAYLOG_TRANSPORT_EMAIL_ENABLED="true"
GRAYLOG_TRANSPORT_EMAIL_PORT="587"
GRAYLOG_TRANSPORT_EMAIL_USE_AUTH="true"
GRAYLOG_TRANSPORT_EMAIL_AUTH_USERNAME="notification@example.com"
GRAYLOG_TRANSPORT_EMAIL_AUTH_PASSWORD="password"
GRAYLOG_TRANSPORT_EMAIL_USE_TLS="true"
GRAYLOG_TRANSPORT_EMAIL_USE_SSL="false"
GRAYLOG_TRANSPORT_FROM_EMAIL="notification@example.com"
GRAYLOG_TRANSPORT_SUBJECT_PREFIX="[Graylog-1]"

I also tried adding these to the docker-compose.yml to the graylog service without success.

Here's my docker-compose file:

version: "3.8"

services:
  mongodb:
    image: "mongo:5.0"
    volumes:
      - "mongodb_data:/data/db"
    restart: "always"

  datanode:
    image: "${DATANODE_IMAGE:-graylog/graylog-datanode:5.2}"
    hostname: "247a89a3e074"
    environment:
      GRAYLOG_HOSTNAME: "247a89a3e074"
      GRAYLOG_DATANODE_NODE_ID_FILE: "/var/lib/graylog-datanode/node-id"
      GRAYLOG_DATANODE_PASSWORD_SECRET: "${GRAYLOG_PASSWORD_SECRET:?Please configure GRAYLOG_PASSWORD_SECRET in the .env file}"
      GRAYLOG_DATANODE_ROOT_PASSWORD_SHA2: "${GRAYLOG_ROOT_PASSWORD_SHA2:?Please configure GRAYLOG_ROOT_PASSWORD_SHA2 in the .env file}"
      GRAYLOG_DATANODE_MONGODB_URI: "mongodb://mongodb:27017/graylog"
    ulimits:
      memlock:
        hard: -1
        soft: -1
      nofile:
        soft: 65536
        hard: 65536
    ports:
      - "127.0.0.1:8999:8999/tcp"   # DataNode API
      - "127.0.0.1:9200:9200/tcp"
      - "127.0.0.1:9300:9300/tcp"
    volumes:
      - "graylog-datanode:/var/lib/graylog-datanode"
    restart: "always"

  graylog:
    hostname: "server"
    image: "${GRAYLOG_IMAGE:-graylog/graylog:5.2}"
    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_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://mongodb:27017/graylog"
    ports:
    - "127.0.0.1:5044:5044/tcp"   # Beats
    - "5140:5140/udp"   # Syslog
    - "5140:5140/tcp"   # Syslog
    - "127.0.0.1:5555:5555/tcp"   # RAW TCP
    - "127.0.0.1:5555:5555/udp"   # RAW TCP
    - "127.0.0.1:9000:9000/tcp"   # Server API
    - "127.0.0.1:12201:12201/tcp" # GELF TCP
    - "127.0.0.1:12201:12201/udp" # GELF UDP
    #- "127.0.0.1:10000:10000/tcp" # Custom TCP port
    #- "127.0.0.1:10000:10000/udp" # Custom UDP port
    - "127.0.0.1:13301:13301/tcp" # Forwarder data
    - "127.0.0.1:13302:13302/tcp" # Forwarder config
    - "5141-5199:5141-5199/tcp" # ports for inputs
    - "5141-5199:5141-5199/udp" # ports for inputs
    volumes:
      - "graylog_data:/usr/share/graylog/data/data"
      - "graylog_journal:/usr/share/graylog/data/journal"
    restart: "always"

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

@kroepke kroepke added triaged bug Something isn't working labels Dec 4, 2023
@andrepaulotek
Copy link
Author

Just tested again after updating to 5.2.3 with this and it worked

graylog:
  hostname: "server"
  image: "${GRAYLOG_IMAGE:-graylog/graylog:5.2}"
  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_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://mongodb:27017/graylog"
    GRAYLOG_TRANSPORT_EMAIL_PROTOCOL: "smtp"
    GRAYLOG_TRANSPORT_EMAIL_WEB_INTERFACE_URL: "https://192.168.1.1/"
    GRAYLOG_TRANSPORT_EMAIL_HOSTNAME: "smtp.example.com"
    GRAYLOG_TRANSPORT_EMAIL_ENABLED: "true"
    GRAYLOG_TRANSPORT_EMAIL_PORT: "587"
    GRAYLOG_TRANSPORT_EMAIL_USE_AUTH: "true"
    GRAYLOG_TRANSPORT_EMAIL_AUTH_USERNAME: "username"
    GRAYLOG_TRANSPORT_EMAIL_AUTH_PASSWORD: "password"
    GRAYLOG_TRANSPORT_EMAIL_USE_TLS: "true"
    GRAYLOG_TRANSPORT_EMAIL_FROM_EMAIL: "email@example.com"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged
Projects
None yet
Development

No branches or pull requests

3 participants