I am trying to send JSON data to HTTP plugin and that output to Kafka using Kafka plugin. In this HTTP input plugin shows output in the first attempt and sends only a small amount of data to Kafka. When I hit it next time there is no data in logs but that small fraction of data comes at Kafka topic.
input {
http {
host => "0.0.0.0"
port => "5000"
response_headers => {
"Access-Control-Allow-Origin" => "*"
"Content-Type" => "text/plain"
"Access-Control-Allow-Headers" => "Origin, X-Requested-With, Content-Type,
Accept"
}
}
}
output {
stdout {
codec => json
}
kafka {
#codec => json
bootstrap_servers => "kafka:9092"
topic_id => "NotificationTopic"
}
}
I am getting this in Kafka Topic:
{
"@version" => "1",
"@timestamp" => 2019-08-28T12:23:52.368Z,
"message" => "2019-08-28T12:23:51.647Z 192.168.144.1 %{message}"
}
The HTTP input plugin should be accepting data at every hit and should be sent the same to the Kafka output plugin.