Skip to main content

Kafka

This plugin discovers Kafka topics from Kafka clusters.

Status: experimental

Example Configuration


bootstrap_servers: "localhost:9092"
client_id: "marmot-kafka-plugin"
client_timeout_seconds: 60
authentication:
type: "sasl_plaintext"
username: "username"
password: "password"
mechanism: "PLAIN"
tls:
enabled: true
cert_path: "/path/to/cert.pem"
key_path: "/path/to/key.pem"
ca_cert_path: "/path/to/ca.pem"
skip_verify: false
schema_registry:
url: "http://localhost:8081"
enabled: true
config:
basic.auth.user.info: "username:password"
topic_filter:
include:
- "^prod-.*"
- "^staging-.*"
exclude:
- ".*-test$"
- ".*-dev$"
include_partition_info: true
include_topic_config: true
tags:
- "kafka"
- "messaging"

Configuration

The following configuration options are available:

PropertyTypeRequiredDescription
bootstrap_serversstringfalseComma-separated list of bootstrap servers
client_idstringfalseClient ID for the consumer
authenticationAuthConfigfalseAuthentication configuration
consumer_configmap[string]stringfalseAdditional consumer configuration
client_timeout_secondsintfalseRequest timeout in seconds
tlsTLSConfigfalseTLS configuration
schema_registrySchemaRegistryConfigfalseSchema Registry configuration
topic_filterplugin.FilterfalseFilter configuration for topics
include_partition_infoboolfalseWhether to include partition information in metadata
include_topic_configboolfalseWhether to include topic configuration in metadata

Available Metadata

The following metadata fields are available:

FieldTypeDescription
cleanup_policystringTopic cleanup policy
delete_retention_msstringTime to retain deleted segments in milliseconds
group_idstringConsumer group ID
key_schemastringKey schema definition
key_schema_idintID of the key schema in Schema Registry
key_schema_typestringType of the key schema (AVRO, JSON, etc.)
key_schema_versionintVersion of the key schema
max_message_bytesstringMaximum message size in bytes
members[]stringMembers of the consumer group
min_insync_replicasstringMinimum number of in-sync replicas
partition_countint32Number of partitions
protocolstringRebalance protocol
protocol_typestringProtocol type
replication_factorint16Replication factor
retention_bytesstringMaximum size of the topic in bytes
retention_msstringMessage retention period in milliseconds
segment_bytesstringSegment file size in bytes
segment_msstringSegment file roll time in milliseconds
statestringCurrent state of the consumer group
subscribed_topics[]stringTopics the group is subscribed to
topic_namestringName of the Kafka topic
value_schemastringValue schema definition
value_schema_idintID of the value schema in Schema Registry
value_schema_typestringType of the value schema (AVRO, JSON, etc.)
value_schema_versionintVersion of the value schema