I’m currently running a Graylog setup through Docker Compose in Ubuntu 22.04.2, and have been unable to set the server time zone to reflect the current one im in.
OS Information: Ubuntu 22.04.2
Package Version: 5.0
Service logs, configurations, and environment variables:
Configuration attempts in docker compose file under the “environment” section:
GRAYLOG_ROOT_TIMEZONE: "America/Toronto"
TZ: "America/Toronto"
I’m looking for insight as to why the container isn’t taking the hosts timezone which is properly configured, the web time and root time are the correct ones. But when it comes to the server time, it still reflect +0:00 instead of -4:00
gsmith
(GSmith)
May 11, 2023, 11:13pm
2
Hey @walachewaka
Have you tried it without quotes? and use equal sign?
- TZ=America/Chicago
# CHANGE ME (must be at least 16 characters)!
- GRAYLOG_PASSWORD_SECRET=pJod1TRZAckHmqM2oQPqX1qnLTZuyb2YW9
# Password: admin
- GRAYLOG_ROOT_PASSWORD_SHA2=ef92b778bafe771e89245b89ec9911881f383d4473e94f
- GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000
- GRAYLOG_HTTP_EXTERNAL_URI=http://192.168.1.28:9000/
- GRAYLOG_ROOT_TIMEZONE=America/Chicago
I have tried, however the file seems to be expecting “:” since it throws an error saying on that specific line it could not find the “:”
Here is the full environment configuration:
GRAYLOG_NODE_ID_FILE: "/usr/share/graylog/data/config/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_ELASTICSEARCH_HOSTS: "http://opensearch:9200"
GRAYLOG_MONGODB_URI: "mongodb://mongodb:27017/graylog"
# To make reporting (headless_shell) work inside a Docker container
GRAYLOG_REPORT_DISABLE_SANDBOX: "true"
GRAYLOG_ROOT_TIMEZONE: "America/Toronto"
TZ: "America/Toronto"
gsmith
(GSmith)
May 11, 2023, 11:29pm
4
Hey
, Not sure but mine works,
I do not use colons ": for Graylog’s env variables.
graylog:
image: graylog/graylog:5.0-jre11
network_mode: bridge
dns:
- 192.168.2.15
- 192.168.2.16
# journal and config directories in local NFS share for persistence
volumes:
- graylog_journal:/usr/share/graylog/data/journal
- graylog_bin:/usr/share/graylog/bin
- graylog_data:/usr/share/graylog/data
environment:
# Container time Zone
- TZ=America/Chicago
# CHANGE ME (must be at least 16 characters)!
- GRAYLOG_PASSWORD_SECRET=pJod1TRZAckHmqM2oQPqX1qnLVJS99jHm2
# Password: admin
- GRAYLOG_ROOT_PASSWORD_SHA2=ef92b778bafe771e89245b
- GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000
- GRAYLOG_HTTP_EXTERNAL_URI=http://192.168.1.28:9000/
- GRAYLOG_ROOT_TIMEZONE=America/Chicago
- GRAYLOG_ROOT_EMAIL=greg.smith@domain.com
- GRAYLOG_HTTP_PUBLISH_URI=http://192.168.1.28:9000/
- GRAYLOG_TRANSPORT_EMAIL_PROTOCOL=smtp
- GRAYLOG_HTTP_ENABLE_CORS=true
- GRAYLOG_TRANSPORT_EMAIL_WEB_INTERFACE_URL=http://192.168.1.28:9000/
- GRAYLOG_TRANSPORT_EMAIL_HOSTNAME=192.168.1.28
- GRAYLOG_TRANSPORT_EMAIL_ENABLED=true
- GRAYLOG_TRANSPORT_EMAIL_PORT=25
- GRAYLOG_TRANSPORT_EMAIL_USE_AUTH=false
- GRAYLOG_TRANSPORT_EMAIL_USE_TLS=false
- GRAYLOG_TRANSPORT_EMAIL_USE_SSL=false
- GRAYLOG_TRANSPORT_FROM_EMAIL=root@localhost
- GRAYLOG_TRANSPORT_SUBJECT_PREFIX=[graylog]
EDIT: I forgot to mention, this is a YAML file so spaces and indents count.
gsmith
(GSmith)
May 11, 2023, 11:45pm
6
Im a Day “Saver” you can catch me on Graylog Discord.
1 Like
system
(system)
Closed
May 25, 2023, 11:45pm
7
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.