metricbeat 6.2.3/elasticsearch 6.2.2/kubernetes 1.9
error:
ERROR pipeline/output.go:74 Failed to connect: Get http://elasticsearch:9200: lookup elasticsearch on 148.93.51.11:53: no such host
Where does '148.93.51.11:53' come from? No such IP in system?
Works fine if host is changed to Kubernetes internal Cluster IP created for Elasticsearch service.
Interestingly, Filebeat has a similar config, but is able to resolve elasticsearch:9200 host
That IP is the DNS server, the error comes from its answer.
In order to debug why Metricbeat cannot resolve elasticsearch we would need some more info about your deploy, like Metricbeat manifests and how elasticsearch is deployed. I understand there is an elasticsearch service in the same namespace?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.