- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Supported OS
This Agent integration collects message offset metrics from your Kafka consumers. This check fetches the highwater offsets from the Kafka brokers, consumer offsets that are stored in Kafka (or Zookeeper for old-style consumers), and then calculates consumer lag (which is the difference between the broker offset and the consumer offset).
Note:
The Agent’s Kafka consumer check is included in the Datadog Agent package. No additional installation is needed on your Kafka nodes.
To configure this check for an Agent running on a host running your Kafka consumers:
Edit the kafka_consumer.d/conf.yaml
file, in the conf.d/
folder at the root of your Agent’s configuration directory. See the sample kafka_consumer.d/conf.yaml for all available configuration options.
This check does not collect additional logs. To collect logs from Kafka brokers, see log collection instructions for Kafka.
For containerized environments, see the Autodiscovery Integration Templates for guidance on applying the parameters below.
Parameter | Value |
---|---|
<INTEGRATION_NAME> | kafka_consumer |
<INIT_CONFIG> | blank or {} |
<INSTANCE_CONFIG> | {"kafka_connect_str": <KAFKA_CONNECT_STR>} For example, {"kafka_connect_str": "server:9092"} |
This check does not collect additional logs. To collect logs from Kafka brokers, see log collection instructions for Kafka.
Run the Agent’s status subcommand and look for kafka_consumer
under the Checks section.
kafka.broker_offset (gauge) | Current message offset on broker. Shown as offset |
kafka.consumer_lag (gauge) | Lag in messages between consumer and broker. Shown as offset |
kafka.consumer_offset (gauge) | Current message offset on consumer. Shown as offset |
kafka.estimated_consumer_lag (gauge) | Lag in seconds between consumer and broker. This metric is provided through Data Streams Monitoring. Additional charges may apply. Shown as second |
consumer_lag:
The Datadog Agent emits an event when the value of the consumer_lag
metric goes below 0, tagging it with topic
, partition
and consumer_group
.
The Kafka-consumer check does not include any service checks.
Kerberos GSSAPI Authentication
Depending on your Kafka cluster’s Kerberos setup, you may need to configure the following:
tls_cert
and/or tls_ca_cert
options.tls_private_key
option. If applicable, the private key password should be configured with the tls_private_key_password
.KRB5_CLIENT_KTNAME
environment variable pointing to the Kafka client’s Kerberos keytab location if it differs from the default path (for example, KRB5_CLIENT_KTNAME=/etc/krb5.keytab
)KRB5CCNAME
environment variable pointing to the Kafka client’s Kerberos credentials ticket cache if it differs from the default path (for example, KRB5CCNAME=/tmp/krb5cc_xxx
)systemd
environment:Linux Systemd Example
/path/to/environment/file
KRB5_CLIENT_KTNAME=/etc/krb5.keytab
KRB5CCNAME=/tmp/krb5cc_xxx
Create a Datadog Agent service configuration override file: sudo systemctl edit datadog-agent.service
Configure the following in the override file:
[Service]
EnvironmentFile=/path/to/environment/file
sudo systemctl daemon-reload
sudo systemctl restart datadog-agent.service
sudo service datadog-agent restart