Skip to main content

Kafka

Status: experimental

The Kafka plugin discovers and catalogs Kafka topics from Kafka clusters. It captures topic configurations, partition details, schema information from Schema Registry, and supports various authentication methods including SASL and TLS.

Connection Examples

Confluent Cloud

bootstrap_servers: "pkc-xxxxx.us-west-2.aws.confluent.cloud:9092"
client_id: "marmot-discovery"
authentication:
type: "sasl_ssl"
username: "your-api-key"
password: "your-api-secret"
mechanism: "PLAIN"
tls:
enabled: true
schema_registry:
url: "https://psrc-xxxxx.us-west-2.aws.confluent.cloud"
enabled: true
config:
basic.auth.user.info: "sr-key:sr-secret"
tags:
- "confluent"

Redpanda Cloud

bootstrap_servers: "seed-xxxxx.cloud.redpanda.com:9092"
client_id: "marmot-discovery"
authentication:
type: "sasl_ssl"
username: "your-username"
password: "your-password"
mechanism: "SCRAM-SHA-256"
tls:
enabled: true
tags:
- "redpanda"

Self-Hosted with SASL

bootstrap_servers: "kafka-1.prod.com:9092,kafka-2.prod.com:9092"
client_id: "marmot-discovery"
authentication:
type: "sasl_ssl"
username: "your-username"
password: "your-password"
mechanism: "SCRAM-SHA-512"
tls:
enabled: true
ca_cert_path: "/path/to/ca.pem"
cert_path: "/path/to/client.pem"
key_path: "/path/to/client-key.pem"

Example Configuration


bootstrap_servers: "kafka-1.prod.com:9092,kafka-2.prod.com:9092"
client_id: "marmot-discovery"
authentication:
type: "sasl_ssl"
username: "your-api-key"
password: "your-api-secret"
mechanism: "PLAIN"
tls:
enabled: true
tags:
- "kafka"
- "streaming"

Configuration

The following configuration options are available:

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

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