I have set up Kibana and Elasticsearch and they work fine so far.
I have also set up Filebeat on another aws ec2 instance to send logs to Elasticsearch and monitor from Kibana
But for some reason Filebeat cannot connect to Kibana. filebeat setup -e command logs an error for Kibana
stack info: filebeat version 7.13.4 (amd64), libbeat 7.13.4 kibana v 7.13.4 elasticsearch v 7.13.4
filebeat setup -e log info:
2021-07-22T12:28:26.992+0900 INFO template/load.go:228 Existing template will be overwritten, as overwrite is enabled.
2021-07-22T12:28:28.440+0900 INFO template/load.go:131 Try loading template filebeat-7.13.4 to Elasticsearch
2021-07-22T12:28:29.206+0900 INFO template/load.go:123 template with name 'filebeat-7.13.4' loaded.
2021-07-22T12:28:29.206+0900 INFO [index-management] idxmgmt/std.go:297 Loaded index template.
2021-07-22T12:28:29.217+0900 INFO [index-management.ilm] ilm/std.go:121 Index Alias filebeat-7.13.4 exists already.
Index setup finished.
Loading dashboards (Kibana must be running and reachable)
2021-07-22T12:28:29.217+0900 WARN [cfgwarn] tlscommon/config.go:105 DEPRECATED: Treating the CommonName field on X.509 certificates as a host name when no Subject Alternative Names are present is going to be removed. Please update your certificates if needed. Will be removed in version: 8.0.0
2021-07-22T12:28:29.217+0900 INFO kibana/client.go:119 Kibana url: https://kibana.myurl.com:443
2021-07-22T12:28:31.177+0900 INFO kibana/client.go:119 Kibana url: https://kibana.myurl.com:443
2021-07-22T12:28:31.238+0900 ERROR instance/beat.go:989 Exiting: 1 error: error loading index pattern: parsing kibana response </html>nter>nginx/1.18.0 (Ubuntu)</center>h1></center>d>esponse: <html>
Exiting: 1 error: error loading index pattern: parsing kibana response: invalid character '<' looking for beginning of value. Response </html>nter>nginx/1.18.0 (Ubuntu)</center>h1></center>d>
Try to curl -XGET http://your_kibana_instance:5601/api/status to get a response. But it seems from those logs you have an nginx that might be affecting your connection
How does your Filebeat config looks like? One thing you said that I realized now and I didn't the first time. You are trying to connect to Kibana from Filebeat to fetch Kibana logs. To do so you must configure the Filebeat module of Kibana.
Just in case, and forgive me for being a bit basic, you don't send your logs to Kibana but to elasticsearch and you use kibana to visualize them. If you want to fetch Kibana logs to later visualize them on Kibana too, Filebeat must be deployed on the same instance of Kibana and read those log files (you can't access them by http)
If I open port 5601 for Kibana on the host and configure Filebeat to that url i.e ip address plus 5601 port everything works fine.
In the beginning the problem was caused by Filebeat's built-in Kibana dashboard being enabled but when i enable and disable Kibana module in Filebeat back-and-forth and test it the result is the same.
You are trying to connect to Kibana from Filebeat to fetch Kibana logs.
I am not sure if this is true but as far as i know if Kibana settings is not present in Filebeat config
file, then Filebeat tries to access Kibana on localhost so Kibana settings should explicitly be given in the config file. Also I am not planning to make use of Kibana instance logs for now and this connection to Kibana from Filebeat is unintentional. I guess this is the predetermined behaviour of Filebeat?
you don't send your logs to Kibana but to elasticsearch and you use kibana to visualize them.
Yes, I want to send my logs to Elasticsearch and visualize them in Kibana, if my settings reflect otherwise please help me figure this out
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.