遇到一个 graylog 日志收集问题,收不到其他服务器的日志,只能收到当前机器的服务日志

2022-08-25 10:15:29 +08:00
 EggplantLover
docker-compose 配置如下
mongo:
image: mongo:4.4.15
networks:
- graylog
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Dlog4j2.formatMsgNoLookups=true -Xms512m -Xmx512m"
- GRAYLOG_ROOT_TIMEZONE=Asia/Shanghai
ulimits:
memlock:
soft: -1
hard: -1
deploy:
resources:
limits:
memory: 2g
networks:
- graylog
graylog:
image: graylog/graylog:4.2-jre11
# network_mode: "host"
# volumes:
# - /data/graylog:/usr/share/graylog/data/journal
environment:
- GRAYLOG_PASSWORD_SECRET=somepasswordpepper
- GRAYLOG_ROOT_PASSWORD_SHA2=8f39e5e09d40e5743f0898ca26ef28f2c9193916a86480b7c0ec27148c7bb8e3
- GRAYLOG_HTTP_EXTERNAL_URI=http://xxxx:9000/ # 这里注意要改 ip
- GRAYLOG_ROOT_TIMEZONE=Asia/Shanghai # 设置时区
entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh
networks:
- graylog
privileged: true
restart: always
depends_on:
- mongo
- elasticsearch
ports:
- 9000:9000
- 1514:1514
- 1514:1514/udp
- 12201:12201
- 12201:12201/udp
- 12203:12203/udp
volumes:
- "/etc/localtime:/etc/localtime"
600 次点击
所在节点    问与答
2 条回复
EggplantLover
2022-08-25 10:19:53 +08:00
从别的机器使用 nc -vuz ip 12201 命令测试发现到 graylog 的接收端口是可以连通的,但却收不到日志
EggplantLover
2022-08-27 12:24:36 +08:00
11

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/875241

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX