Docker安裝graylog

碼農記事本發表於2020-12-16

官網:https://docs.graylog.org/en/3.0/pages/installation/docker.html
參考文章:https://www.cnblogs.com/kylingx/p/11960293.html

安裝mongodb

docker run \
--name mongo \
-p 27017:27017 \
-v /etc/localtime:/etc/localtime:ro \
-v /opt/mongo_data:/data \
-d mongo:latest

安裝es

docker run \
--name elasticsearch \
-p 9200:9200 -p 9300:9300 \
-e "http.host=0.0.0.0" \
-e "ES_JAVA_OPTS=-Xms512m -Xmx512m" \
-e "discovery.type=single-node" \
-e http.cors.allow-origin="*" \
-e http.cors.enabled=true \
-v /etc/localtime:/etc/localtime:ro \
-v /opt/es_data:/usr/share/elasticsearch/data \
-d docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.5

安裝graylog

docker run \
--link mongo \
--link elasticsearch \
--name graylog \
-p 9000:9000 \
-p 12201:12201 -p 12201:12201/udp \
-p 1514:1514 -p 1514:1514/udp \
-e GRAYLOG_ROOT_TIMEZONE=Asia/Shanghai \
-e GRAYLOG_HTTP_EXTERNAL_URI=http://172.23.62.248:9000/ \
-e GRAYLOG_WEB_ENDPOINT_URI="http://172.23.62.248:9000/:9000/api" \
-e GRAYLOG_PASSWORD_SECRET=somepasswordpepper \
-e GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 \
-v /etc/localtime:/etc/localtime:ro \
-v graylog_journal:/usr/share/graylog/data/journal \
-d graylog/graylog:3.1

訪問地址:http://172.23.62.248:9000/
使用者密碼:admin/admin