【发布时间】:2020-09-11 11:25:57
【问题描述】:
我为在 Google Cloud VM 上运行的应用程序提供了 docker 服务。 在同一个虚拟机上,我安装了 splunk 来监控创建的容器。
我已经阅读了一些教程,并首先测试通过 hello-world 容器通过 HTTP 事件收集器推送容器指标。 我使用了以下命令:
sudo docker run --log-driver=splunk \
--log-opt splunk-url=http://34.121.xx.xxx:8088 \
--log-opt splunk-token=xxx-xxx-xxx-xxx-xxx \
--log-opt splunk-insecureskipverify=true \
hello-world
但它无法创建该容器并给出错误:
docker: Error response from daemon: failed to initialize logging driver: Options http://34.121.xx.xxx:8088/services/collector/event/1.0: read tcp 10.128.x.x:39404->34.121.xx.xxx:8088: read: connection reset by peer.ERRO[0001] error waiting for container: context canceled
10.128.x.x 是虚拟机的内部 IP。
我不知道为什么会这样。我是新来的。任何人都可以帮忙吗?我错过了一些配置吗?
【问题讨论】:
标签: docker containers splunk