gpt4 book ai didi

elasticsearch - cadvisor, elasticsearch, docker : no Elasticsearch node available

转载 作者:行者123 更新时间:2023-12-02 18:41:31 26 4
gpt4 key购买 nike

我正在尝试使用 docker 将 cadvisor 连接到 elasticsearch,但出现错误:

cadvisor.go:113] Failed to initialize storage driver: failed to create the elasticsearch client - no Elasticsearch node available

docker-compose.yml

version: '2'
services:
elasticsearch:
image: "elasticsearch:2.3.3"
container_name: "elasticsearch"
ports:
- "9200:9200"
kibana:
image: "kibana:4.5.1"
container_name: "kibana"
ports:
- "5601:5601"
links:
- elasticsearch
cadvisor:
image: "google/cadvisor:latest"
container_name: "cadvisor"
ports:
- "8080:8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
links:
- elasticsearch
restart: always
command: -storage_driver="elasticsearch" -storage_driver_es_host="http://elasticsearch:9200"

如果我将命令更改为

command: -storage_driver="elasticsearch" -storage_driver_es_host="http://172.22.0.5:9200"

一切正常。有什么想法吗?

最佳答案

你缺少的是 elasticsearch 中的索引,不幸的是,这没有很好的记录

转到您的 kibana 仪表板、开发工具并发送此请求:

PUT/.kibana/index-pattern/cadvisor
{"title": "cadvisor", "timeFieldName": "container_stats.timestamp"}

关于elasticsearch - cadvisor, elasticsearch, docker : no Elasticsearch node available,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37633249/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com