For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

-p

HTTP server port (for health/readiness endpoints)

(disabled)

Kafka mode does not start the HTTP server by default. Pass -p explicitly if you need /health and /ready endpoints (e.g. for Kubernetes probes).

Graceful shutdown

The Kafka consumer shuts down gracefully on SIGINT/SIGTERM — in-flight messages are finished processing and offsets are committed before exit. If the HTTP server is running (-p), the /health endpoint returns 503 during shutdown to allow load balancers or Kubernetes to drain traffic.

At least once delivery

In Kafka mode, events are not buffered in SQLite. Instead, the consumer offset is used to provide 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:

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.

An example heartbeat payload:

Sample command

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

Last updated

Was this helpful?