https://github.com/kjdev/apache-mod-kafka
Kafka data collector module for Apache HTTPD Server
https://github.com/kjdev/apache-mod-kafka
Last synced: 6 months ago
JSON representation
Kafka data collector module for Apache HTTPD Server
- Host: GitHub
- URL: https://github.com/kjdev/apache-mod-kafka
- Owner: kjdev
- Created: 2016-03-01T22:50:59.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-02T03:15:10.000Z (over 9 years ago)
- Last Synced: 2025-06-30T23:44:39.106Z (8 months ago)
- Language: C
- Size: 10.7 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mod_kafka
mod_kafka is Kafka data collector module for Apache HTTPD Server.
## Requires
* [librdkafka](https://github.com/edenhill/librdkafka.git)
## Build
```
% git clone --depth=1 https://github.com/kjdev/apache-mod-kafka.git
% cd apache-mod-kafka
```
### Used embeddeded librdkafka [DEFAULT]
```
% git submodule update --init
% ./autogen.sh # OR autoreconf -i
% ./configure [OPTION]
% make
```
### Installed librdkafka
[librdkafka](https://github.com/edenhill/librdkafka.git)
```
% ./autogen.sh # OR autoreconf -i
% ./configure --with-rdkafka=/usr/include --with-rdkafka-libdir=/usr/lib [OPTION]
% make
```
### Build options
embeddeded librdkafka.
* `--enable-ssl`: use SSL library [default=yes]
* `--enable-sasl`: use Cyrus SASL library [default=yes]
* `--enable-zlib`: use Zlib library [default=yes]
librdkafka path (installed librdkafka).
* `--with-rdkafka=PATH`: find a __rdkafka.h__
* `--with-rdkafka-libdir=PATH`: find a __librdkafka.so__
apache path.
* `--with-apxs=PATH`
* `--with-apr=PATH`
## Install
```
$ install -p -m 755 -D .libs/mod_kafka.so /etc/httpd/modules/mod_kafka.so
```
## Configration
`httpd.conf`:
```
# Load module
LoadModule kafka_module modules/mod_kafka.so
# Kafka brokers: host[:port][,host[:port]] (DEFAULT: localhost:9092)
KafkaBrokers localhost:9092
# Kafka config: optional
KafkaConf global reconnect.backoff.jitter.ms 1000
KafkaConf topic request.timeout.ms 10000
# Kafka output: kafka:topic[@partition] log
CustomLog kafka:test combined
# Kafka output: topic and partition from logfomat
## format : "kafka:topic[@partition]|..."
LogFormat "kafka:test|%h %l %u %t \"%r\" .." kafka_log
CustomLog kafka:- kafka_log
```
See [configration](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md).