问题
i pulled docker images of filbeat and elastic search. I run the containers. i set the environment variable of elastic search "discovery.type=single-node" in running command.i configured filebeat.yml apache.yml elastisearch.yml. but i am getting following error:
Exiting: Couldn't connect to any of the configured Elasticsearch hosts. Errors: [Error connection to Elasticsearch http://elasticsearch:9200: Get http://elasticsearch:9200: lookup elasticsearch on 192.168.65.1:53: no such host]
my filebeat.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:}'
my 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:
my elasticsearch.yml:
cluster.name: "docker-cluster"
network.host: 0.0.0.0
and when i tried to restart the container of filebeat it is not getting started. i think it is corrupted.
来源:https://stackoverflow.com/questions/60208754/error-while-setting-filebeat-up-and-make-it-connect-to-elastic-search