Kafka

This plugin is used to write events to a Kafka topic. It uses the Kafka Producer API to write messages to a topic on the broker. The only required configuration is the topic_id.

Let's look at a basic Kafka configuration:

#kafka.conf

input {
stdin{
}
}

output {
kafka {
bootstrap_servers => "localhost:9092"
topic_id => 'logstash'
}
}

The bootstrap_servers parameter takes the list of all server connections in the form of host1:port1, host2:port2, and so on, and the producer will only use it for getting metadata (topics, partitions, and replicas). The socket connections for sending the actual data will be established based on the broker information that's returned in the metadata. topic_id refers to the topic name where messages will be published.

Note: Only Kafka version 0.10.0.x is compatible with Logstash versions 2.4.x to 5.x.x and the Kafka output plugin version 5.x.x.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.203.107