elasticsearch - 设置filebeat并使其连接到弹性搜索时出错
问题描述
我提取了 filbeat 和弹性搜索的 docker 图像。我运行容器。我在运行命令中设置了弹性搜索“discovery.type=single-node”的环境变量。我配置了filebeat.yml apache.yml elastisearch.yml。但我收到以下错误:
退出:无法连接到任何已配置的 Elasticsearch 主机。错误:[与 Elasticsearch http://elasticsearch:9200的连接错误:获取http://elasticsearch:9200:在 192.168.65.1:53 上查找 elasticsearch:没有这样的主机]
我的文件beat.yml:
filebeat.config:
modules:
path: ${path.config}/modules.d/apache.yml
reload.enabled: true
setup.dashboards.enabled: true
setup.kibana.host: "http://kibana:5601"
#processors:
#- add_cloud_metadata:
output.elasticsearch:
hosts: [ "http://elasticsearch:9200" ]
#username: '${ELASTICSEARCH_USERNAME:}'
#password: '${ELASTICSEARCH_PASSWORD:}'
我的 apache.yml:
- module: apache
# Access logs
access:
enabled: true
# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
var.paths: C:\Users\saivishal.vangala\Desktop\filbeatdemo
# Error logs
error:
enabled: true
# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
#var.paths:
我的弹性搜索.yml:
cluster.name: "docker-cluster"
network.host: 0.0.0.0
当我尝试重新启动 filebeat 的容器时,它没有启动。我认为它已损坏。
解决方案
推荐阅读
- docker - 如何在 Openshift 中以非 root 身份运行 dotnet-counters?
- angularjs - Form.io AngularJS 设置“选项”
- php - var_dump($sth->fetchAll(PDO::FETCH_COLUMN|PDO::FETCH_GROUP)); 没有按预期工作
- java - 最佳实践确认第二个人的数据变化
- javascript - TypeError:无法读取未定义的 React-Redux 的属性“地图”
- hyperlink - 为什么 -pthread 工作但 -lpthread 不工作?
- python - “NoneType”类型的错误对象没有带有 json 和 csv 的 len()
- java - 为什么我的 System.out.println 不工作?这也不是主类,当我尝试从主类访问它时,我没有得到输出
- google-apps-script - 如何在 XMLService getAttribute 方法中捕获执行错误?
- json - 从 API 调用获取数据并在 UItableView 行单击上显示另一个 viewController