thank you for your response.
I use docker-compose as it said on graylog websit with mongodb and elasticsearch and graylog inside it . I added the network as you said mode for graylog part but it could not connect to mongodb and elasticsearch so it didnt work , I uploaded my docker-compose .
Blockquote
version: ‘2’
services:
MongoDB: Docker
mongodb:
image: mongo:5.0.13
volumes:
- mongo_data:/data/db
Elasticsearch: Install Elasticsearch with Docker | Elasticsearch Guide [7.10] | Elastic
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
volumes:
- es_data:/usr/share/elasticsearch/data
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
- “ES_JAVA_OPTS=-Xms512m -Xmx512m”
mem_limit: 1g
Graylog: Docker
graylog:
image: graylog/graylog:5.0
#network_mode: bridge
#dns:
# - 10.0.2.2
volumes:
- graylog_data:/usr/share/graylog/data
- ./graylog/config:/usr/share/graylog/data/config
environment:
# CHANGE ME (must be at least 16 characters)!
- GRAYLOG_PASSWORD_SECRET=somepasswordpepper
# Password: admin
- GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
- GRAYLOG_HTTP_EXTERNAL_URI=http://10.0.2.106:9000/
- GRAYLOG_HTTP_BIND_ADDRESS=0.0.0.0:9000
#entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh
links:
- mongodb:mongo
- elasticsearch
restart: always
depends_on:
- mongodb
- elasticsearch
ports:
# Graylog web interface and REST API
- 9000:9000
# Syslog TCP
- 1514:1514
# Syslog UDP
- 1514:1514/udp
# GELF TCP
- 12201-12210:12201-12210
# GELF UDP
- 12201:12201/udp
# Volumes for persisting data, see https://docs.docker.com/engine/admin/volumes/volumes/
volumes:
mongo_data:
driver: local
es_data:
driver: local
graylog_data:
driver: local
Blockquote