No commit activity in last 3 years
No release in over 3 years
A fluentd output plugin for sending logs to Kafka REST Proxy
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0

Runtime

~> 0.10.0
~> 1.0
 Project Readme

fluent-plugin-out-kafka-rest, a plugin for Fluentd (WIP)

A fluentd output plugin for sending logs to Kafka REST Proxy. This plugin does not use the native library of Apache Kafka itself. Please refer to Confluent's kakfa-rest for the detail of REST Proxy service.

Configs

<match *>
  type            kafka_rest
  endpoint_url    http://localhost.local:8082/topics/topic
  # use_ssl         false
  # serializer      json_bin
  # rate_limit_msec 0
</match>

use https

When you use https instead of http, set "use_ssl" to true.

The following is an example.

<match *>
  type            kafka_rest
  endpoint_url    https://localhost.local:8082/topics/topic
  use_ssl         true
  # serializer      json_bin
  # rate_limit_msec 0
</match>

I simply tested https mode with AWS's ELB.

IMAGE

fluentd --> ELB --> Kafka REST Proxy --> Kafka

ToDo

  • Change tests
  • Fix the function to include tags and timestamps. We should include such information into the request body.
  • Add function to submit multiple records at once.
  • Avro support

Note

  • Set use_ssl to true to use https connection
  • Set include_tag to true to include fluentd tag in the event log as a property
  • Set include_timestamp to true to include timestamp (UNIX time) in the event log as a property
  • Set serializer to any to use your own serializer rule except for Kafka REST Proxy's JSON protocol
  • By default, it does not verify the https server. Use VERIFY_PEER and place the cert.pem to the location specified by OpenSSL::X509::DEFAULT_CERT_FILE.
  • Majority of the code are cloned from fluent-plugin-out-https