I installed x-pack on elasticsearch, kibana, and logstash.
Elasticsearch.yml
bootstrap.memory_lock: true
transport.host: localhost
transport.tcp.port: 9300
network.host: 0.0.0.0
http.port: 9200
xpack.ssl.keystore.path: certs/elastic-certificates.p12
xpack.ssl.truststore.path: certs/elastic-certificates.p12
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
Kibana.yml
server.port:5601
server.host: xx.xx.xx.xx
elasticsearch.url: "http://xx.xx.xx.xx:9200/"
elasticsearch.requestTimeout: 90000`
elasticsearch.username: "kibana"
elasticsearch.password: <pwd_generated>
Logstash.yml
pipeline.workers: 4
pipeline.batch.size: 5
pipeline.batch.delay: 300
xpack.monitoring.enabled: true
xpack.monitoring.elasticsearch.url: http://xx.xx.xx.xx:9200/
xpack.monitoring.elasticsearch.username: logstash_system
xpack.monitoring.elasticsearch.password: <pwd_generated>
Logstash config file:
input { stdin { codec => plain { charset => "ISO-8859-1" } } }
filter { }
output {
elasticsearch {
hosts => ["http://xx.xx.xx.xx:9200"]
user => "elastic"
password => <modified_pwd>
}
stdout { codec => rubydebug }
}
With this setting, I started elasticsearch, kibana, and logstash. Data was written into the index for about 10 mins and then it starts throwing this error:
[2018-02-05T23:20:02,277][INFO ][logstash.outputs.elasticsearch] Running health check to see if an Elasticsearch connection is working {:healthcheck_url=>http://localhost:9200/, :path=>"/"}
[2018-02-05T23:20:02,280][WARN ][logstash.licensechecker.licensereader] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://localhost:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://localhost:9200/][Manticore::SocketException] Connection refused (Connection refused)"}
Any help will be appreciated! Thanks!