Skip to content

Commit d839807

Browse files
Update setup instructions for Kafka consumer integration (DataDog#21244)
* Update setup instructions for Kafka consumer integration * Update README.md * Update README.md * Update README.md * Update kafka_consumer/README.md Co-authored-by: Bryce Eadie <bryce.eadie@datadoghq.com> * Update kafka_consumer/README.md Co-authored-by: Bryce Eadie <bryce.eadie@datadoghq.com> * Update kafka_consumer/README.md Co-authored-by: Bryce Eadie <bryce.eadie@datadoghq.com> * update --------- Co-authored-by: Bryce Eadie <bryce.eadie@datadoghq.com>
1 parent d44a08d commit d839807

1 file changed

Lines changed: 29 additions & 24 deletions

File tree

kafka_consumer/README.md

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,54 +20,57 @@ The Agent's Kafka consumer check is included in the [Datadog Agent][2] package.
2020
### Configuration
2121

2222
<!-- xxx tabs xxx -->
23-
<!-- xxx tab "Host" xxx -->
24-
25-
#### Host
26-
27-
To configure this check for an Agent running on a host running your Kafka consumers:
28-
29-
##### Metric collection
30-
31-
1. Edit the `kafka_consumer.d/conf.yaml` file, in the `conf.d/` folder at the root of your [Agent's configuration directory][3]. See the [sample kafka_consumer.d/conf.yaml][4] for all available configuration options.
32-
33-
2. [Restart the Agent][5].
34-
35-
##### Log collection
36-
37-
This check does not collect additional logs. To collect logs from Kafka brokers, see [log collection instructions for Kafka][6].
38-
39-
<!-- xxz tab xxx -->
4023
<!-- xxx tab "Containerized" xxx -->
4124

4225
#### Containerized
4326

44-
For containerized environments, see the [Autodiscovery Integration Templates][17] for guidance on applying the parameters below.
45-
46-
##### Metric collection
27+
Configure this check on a container running the Kafka Consumer.
28+
See the [Autodiscovery Integration Templates][17] for guidance on applying the parameters below.
29+
In Kubernetes, if a single consumers is running on many containers, you can setup this check as a [Cluster Check][20] to avoid having multiple checks collecting the same metrics.
4730

4831
| Parameter | Value |
4932
| -------------------- | ------------------------------------ |
5033
| `<INTEGRATION_NAME>` | `kafka_consumer` |
5134
| `<INIT_CONFIG>` | blank or `{}` |
52-
| `<INSTANCE_CONFIG>` | `{"kafka_connect_str": <KAFKA_CONNECT_STR>}` <br/>For example, `{"kafka_connect_str": "server:9092"}` |
35+
| `<INSTANCE_CONFIG>` | `{"kafka_connect_str": "<KAFKA_CONNECT_STR>", "consumer_groups": {"<CONSUMER_NAME>": {}}}` <br/>For example, `{"kafka_connect_str": "server:9092", "consumer_groups": {"my_consumer_group": {}}}` |
5336

54-
##### Log collection
37+
<!-- xxz tab xxx -->
38+
<!-- xxx tab "Host" xxx -->
39+
40+
Configure this check on a host running the Kafka Consumer.
41+
Avoid having multiple Agents running with the same check configuration, as this puts additional pressure on your Kafka cluster.
42+
43+
1. Edit the `kafka_consumer.d/conf.yaml` file, in the `conf.d/` folder at the root of your [Agent's configuration directory][3]. See the [sample kafka_consumer.d/conf.yaml][4] for all available configuration options. A minimal setup is:
44+
45+
```
46+
instances:
47+
- kafka_connect_str: <KAFKA_CONNECT_STR>
48+
consumer_groups:
49+
# Monitor all topics for consumer <CONSUMER_NAME>
50+
<CONSUMER_NAME>: {}
51+
```
52+
53+
2. [Restart the Agent][5].
5554

56-
This check does not collect additional logs. To collect logs from Kafka brokers, see [log collection instructions for Kafka][6].
5755

5856
<!-- xxz tab xxx -->
5957
<!-- xxz tabs xxx -->
6058

6159
### Validation
6260

63-
[Run the Agent's status subcommand][8] and look for `kafka_consumer` under the Checks section.
61+
1. [Run the Agent's status subcommand][8] and look for `kafka_consumer` under the Checks section.
62+
2. Ensure the metric `kafka.consumer_lag` is generated for the appropriate `consumer_group`.
6463

6564
## Data Collected
6665

6766
### Metrics
6867

6968
See [metadata.csv][9] for a list of metrics provided by this check.
7069

70+
### Kafka messages
71+
72+
This integration is used by [Data Streams Monitoring][18] to [retrieve messages from Kafka on demand][21].
73+
7174
### Events
7275

7376
**consumer_lag**:<br>
@@ -144,3 +147,5 @@ sudo service datadog-agent restart
144147
[17]: https://docs.datadoghq.com/containers/kubernetes/integrations/
145148
[18]: /data-streams
146149
[19]: /integrations/kafka?search=kafka
150+
[20]: /containers/cluster_agent/clusterchecks/
151+
[21]: /data_streams/messages/

0 commit comments

Comments
 (0)