Kafka Consumer

Consuming Apache Kafka messages and forwarding them to ilert as events or heartbeats.

Connection

Connect to your Kafka bootstrap broker(s):

ilagent daemon --kafka_brokers localhost:9092 --kafka_group_id ilagent \
    -e 'events-topic' -r 'heartbeats-topic'
Flag
Description
Default

--kafka_brokers

Comma-separated broker list (required)

--kafka_group_id

Consumer group ID (required)

-e

Topic for event messages

-r

Topic for heartbeat messages

At least once delivery

In Kafka mode, events are not buffered in SQLite. Instead, the consumer offset is used to guarantee at least once delivery. If an event cannot be delivered, the offset is not committed and ilagent will exit after 5 seconds.

We recommend running ilagent so it is automatically restarted on exit:

docker run --restart always ilert/ilagent daemon \
    --kafka_brokers localhost:9092 --kafka_group_id ilagent \
    -e 'events-topic'

Payload format

All message payloads must be JSON. An example event payload using the default field names:

If your payloads use different field names, you can map them with --map_key_etype, --map_key_summary, --map_key_alert_key, and set a fixed integration key with --event_key. See Event Mapping for details.

circle-exclamation

An example heartbeat payload:

Sample command

See Event Mapping for mapping custom message fields to ilert event properties.

Last updated

Was this helpful?