Skip to content
26 changes: 25 additions & 1 deletion packages/kafka/_dev/build/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,29 @@ The `log` dataset is tested with logs from Kafka 0.9, 1.1.0 and 2.0.0.

The `broker`, `consumergroup`, `partition` datastreams are tested with Kafka 0.10.2.1, 1.1.0, 2.1.1, 2.2.2 and 3.6.0.

The `broker` metricset requires Jolokia to fetch JMX metrics. Refer to the Metricbeat documentation about Jolokia for more information.
The `broker`, `consumer`, `controller`, `jvm`, `log_manager`, `network`, `producer`, `raft`, `replica_manager`, `topic` metricsets require Jolokia to fetch JMX metrics. Refer to the `How do I deploy this integration?` section below for more information.

## How do I deploy this integration?

To monitor a Kafka component (such as a broker, producer, or consumer) with Jolokia, you need to attach its JVM agent to the Java process.

1. Download the Jolokia JVM-Agent from the [official website](https://jolokia.org/download.html).

2. Attach the Agent via KAFKA_OPTS by setting the `KAFKA_OPTS` environment variable before starting your Kafka process.

For example, to launch a console producer with the Jolokia agent enabled:

```bash
# Set the KAFKA_OPTS variable to point to the agent JAR
export KAFKA_OPTS="-javaagent:/path/to/jolokia-jvm-agent.jar=port=8778,host=localhost"

# Start the Kafka producer script
./bin/kafka-console-producer.sh --topic test --broker-list kafka_host:9092
```

Make sure to replace `/path/to/jolokia-jvm-agent.jar` with the actual path to the agent you downloaded.

The port and host parameters specify where the Jolokia agent will be accessible.

## Logs

Expand Down Expand Up @@ -58,6 +80,8 @@ Please refer to the following [document](https://www.elastic.co/guide/en/ecs/cur

### raft

Note that this dataset would be only available if Kafka is run in KRaft mode.

The `raft` dataset collects metrics related to Kafka's Raft consensus algorithm implementation (KRaft), which is used for metadata management in Kafka without requiring ZooKeeper. KRaft mode is available in Kafka 3.0.0 and later versions.

This dataset includes metrics such as:
Expand Down
5 changes: 5 additions & 0 deletions packages/kafka/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "1.23.2"
changes:
- description: Update documentation to account for newly added datasets.
type: enhancement
link: https://github.com/elastic/integrations/pull/15390
- version: "1.23.1"
changes:
- description: Add system tests for consumer and producer data streams.
Expand Down
26 changes: 25 additions & 1 deletion packages/kafka/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,29 @@ The `log` dataset is tested with logs from Kafka 0.9, 1.1.0 and 2.0.0.

The `broker`, `consumergroup`, `partition` datastreams are tested with Kafka 0.10.2.1, 1.1.0, 2.1.1, 2.2.2 and 3.6.0.

The `broker` metricset requires Jolokia to fetch JMX metrics. Refer to the Metricbeat documentation about Jolokia for more information.
The `broker`, `consumer`, `controller`, `jvm`, `log_manager`, `network`, `producer`, `raft`, `replica_manager`, `topic` metricsets require Jolokia to fetch JMX metrics. Refer to the `How do I deploy this integration?` section below for more information.

## How do I deploy this integration?

To monitor a Kafka component (such as a broker, producer, or consumer) with Jolokia, you need to attach its JVM agent to the Java process.

1. Download the Jolokia JVM-Agent from the [official website](https://jolokia.org/download.html).

2. Attach the Agent via KAFKA_OPTS by setting the `KAFKA_OPTS` environment variable before starting your Kafka process.

For example, to launch a console producer with the Jolokia agent enabled:

```bash
# Set the KAFKA_OPTS variable to point to the agent JAR
export KAFKA_OPTS="-javaagent:/path/to/jolokia-jvm-agent.jar=port=8778,host=localhost"

# Start the Kafka producer script
./bin/kafka-console-producer.sh --topic test --broker-list kafka_host:9092
```

Make sure to replace `/path/to/jolokia-jvm-agent.jar` with the actual path to the agent you downloaded.

The port and host parameters specify where the Jolokia agent will be accessible.

## Logs

Expand Down Expand Up @@ -353,6 +375,8 @@ Please refer to the following [document](https://www.elastic.co/guide/en/ecs/cur

### raft

Note that this dataset would be only available if Kafka is run in KRaft mode.

The `raft` dataset collects metrics related to Kafka's Raft consensus algorithm implementation (KRaft), which is used for metadata management in Kafka without requiring ZooKeeper. KRaft mode is available in Kafka 3.0.0 and later versions.

This dataset includes metrics such as:
Expand Down
2 changes: 1 addition & 1 deletion packages/kafka/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
format_version: "3.0.2"
name: kafka
title: Kafka
version: "1.23.1"
version: "1.23.2"
description: Collect logs and metrics from Kafka servers with Elastic Agent.
type: integration
categories:
Expand Down