如何解决带有splunk的Docker容器监视器
我为在Google Cloud VM上运行的应用程序提供了docker服务。 在同一台VM上,我已经安装了splunk来监视创建的容器。
我已经看过一些教程,并且首先进行了测试,以通过hello-world容器通过HTTP Event Collector推送容器指标。 我使用了以下命令:
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是VM的内部IP。
我不确定为什么会这样发生。我是新来的。有人可以帮忙吗?我缺少一些配置吗?