Kage

Synopsis

Kage (as in "Kafka AGEnt") reads Offset- and Lag metrics from Kafka and writes them to an InfluxDB.

Motivation

When you're running Kafka you probably want to have monitoring as well.You can - of course - query the beans directly via JMX and work with that, but that requires another JVM that collects the data.If you're a java-shop anyway and have all that available - give it a try.We decided that we wanted to get the metrics straight out of Kafka and feed them into InfluxDB in a configurable way - and here we are now.

Basic Installation

Grab a binary from the Releases or clone the repo and build it yourself.Run the binary with the configuration options found below.

kage agent <CONFIG OPTIONS>

Advanced Installation

There's systemd configuration magic in examples/systemd/.Put the files in the appropriate directories on your machine (in case of Debian/Ubuntu that should be /lib/systemd/systemand /lib/systemd/system-generators), remember to chmod 0755 the generator, create /etc/kage/, run systemctl daemon-reloadand then you should get one service per configuration-file in /etc/kage/.

Configuration

Kage can be configured with command line flags and environment variables.

Command Line Flags

Flag

Options

Multiple Allowed

Description

Environment Variable

--log

stdout, file

No

The type of log to use.

KAGE_LOG

--log.file

No

The path to the file to log to.

KAGE_LOG_FILE

--log.level

debug, info, warn, error

No

The log level to use.

KAGE_LOG_LEVEL

--kafka.brokers

Yes

The kafka seed brokers connect to. Format: 'ip:port'.

KAGE_KAFKA_BROKERS

--kafka.ignore-topics

Yes

The kafka topic patterns to ignore. This may contian wildcards.

KAGE_KAFKA_IGNORE_TOPICS

--kafka.ignore-groups

Yes

The kafka consumer group patterns to ignore. This may contian wildcards.