Why am I geting error [logstash.outputs.elasticsearch] Action?

I am using ELK GA 5.0.0. I am using Logstash to fetch data from Kafka topic. My config i like below;

input {
	kafka{
		group_id => "mygroup"
		topics => ["mytopic"]
		bootstrap_servers => "192.168.0.1:9092,192.168.0.2:9092,192.168.0.3:9092"
		codec => json
		add_field => { "logtype" => "LOGFILE" }
		consumer_threads =>"11"
		max_poll_records =>"50"
	}
}

filter {
	grok {
		match => { "message" => "<(?<timestamp>%{MONTH} %{MONTHDAY}, 20%{YEAR} %{HOUR}:?%{MINUTE}(?::?%{SECOND}) (?:AM|PM))\> <%{GREEDYDATA:f1}> <%{GREEDYDATA:f2}> <%{GREEDYDATA:f3}> <%{GREEDYDATA:f4}> <%{GREEDYDATA:f5}> <%{GREEDYDATA:f6}> <%{GREEDYDATA:f7}>\n <%{GREEDYDATA:f8}>" }
	}
	date {
		match => [ "timestamp", "MMM dd, YYYY hh:mm:ss:SSS aa" ]
		timezone => "UTC"
		target => "@timestamp"
	}
} 

output{
	elasticsearch {
		hosts => ["192.168.0.1:9200","192.168.0.2:9200","192.168.0.3:9200"]
		index => "mylogs-%{+YYYY-MM-dd}"
		flush_size => 50
	}
}

I am getting the below error continously in logstash;

[2018-06-11T10:32:44,408][ERROR][logstash.outputs.elasticsearch] Action
[2018-06-11T10:32:44,408][ERROR][logstash.outputs.elasticsearch] Action
[2018-06-11T10:32:44,408][ERROR][logstash.outputs.elasticsearch] Action
[2018-06-11T10:32:44,408][ERROR][logstash.outputs.elasticsearch] Action

Why is it happening? How can I fix this?

Is that really everything that's on that line?

Yes @magnusbaeck . But before all those lines, there is another error;

[2018-06-11T10:31:25,604][ERROR][logstash.outputs.elasticsearch] Attempted to send a bulk request to elasticsearch' but Elasticsearch appears to be unreachable or down! {:error_message=>"Elasticsearch Unreachable: [http://~hidden~:~hidden~@192.168.0.1:9200][Manticore::SocketTimeout] Read timed out", :class=>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError", :will_retry_in_seconds=>2}

Check your elasticsearch is working or not .

@rijinmp it is working

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.