Skip to main content
Version: Preview

Kafka

Experimental
Creates:
Assets

Configure in the UI

This plugin can be configured directly in the Marmot UI with a step-by-step wizard.

View Guide

Marmot plugin for Apache Kafka. Discovers topics from Kafka clusters, captures topic configurations and partition details and optionally enriches assets with schemas from a Confluent Schema Registry.

Marmot plugins are standalone binaries that the Marmot host launches on demand via go-plugin and talks to over gRPC. It is built on the Marmot plugin SDK.

Looking for a managed service? Marmot has dedicated plugins for Confluent Cloud and Redpanda with pre-configured defaults.

Connection Examples

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"

Self-Hosted with mTLS

bootstrap_servers: "kafka-1.internal:9093"
client_id: "marmot-discovery"
tls:
enabled: true
ca_cert_path: "/etc/kafka/ca.pem"
cert_path: "/etc/kafka/client.pem"
key_path: "/etc/kafka/client-key.pem"

Local development (no auth)

bootstrap_servers: "localhost:9092"
client_id: "marmot-discovery"
tls:
enabled: false

Schema Registry

Enable Schema Registry to enrich discovered topics with their value and key schemas:

schema_registry:
enabled: true
url: "https://schema-registry.prod.com"
config:
basic.auth.user.info: "sr-key:sr-secret"

Schemas for subjects matching {topic}-value, {topic}-key or other {topic}-* patterns are pulled from the registry and attached to the topic asset.

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"

Development

Build and test:

make build
make test

To run a local build inside Marmot:

make install

This copies the binary to ~/.marmot/plugins/, the directory Marmot scans for local plugins. A local plugin shadows the released core plugin with the same name: Marmot skips downloading it and loads your build instead. Delete the binary from ~/.marmot/plugins/ to fall back to the released version.

If your Marmot runs with a custom plugins directory (MARMOT_PLUGINS_DIR), set the same value for make install so both point at the same place.

Configuration

The following configuration options are available:

PropertyTypeRequiredDescription
tagsmultiselectfalseTags to apply to discovered assets
external_links[]objectfalseExternal links to show on all assets
external_links.namestringtrueDisplay name for the link
external_links.iconstringfalseIcon identifier for the link
external_links.urlstringtrueURL to the external resource
filterobjectfalseFilter discovered assets by name (regex)
filter.includemultiselectfalseInclude patterns for resource names (regex)
filter.excludemultiselectfalseExclude patterns for resource names (regex)
bootstrap_serversstringtrueComma-separated list of bootstrap servers
client_idstringfalseClient ID for the consumer
authenticationobjectfalseAuthentication configuration
authentication.typeselectfalseAuthentication type: none, sasl_plaintext, sasl_ssl, ssl
authentication.usernamestringfalseSASL username
authentication.passwordpasswordfalseSASL password
authentication.mechanismselectfalseSASL mechanism: PLAIN, SCRAM-SHA-256, SCRAM-SHA-512
consumer_configstringfalseAdditional consumer configuration
client_timeout_secondsintfalseRequest timeout in seconds
tlsobjectfalseTLS configuration
tls.enabledboolfalseWhether to enable TLS
tls.cert_pathstringfalsePath to TLS certificate file
tls.key_pathstringfalsePath to TLS key file
tls.ca_cert_pathstringfalsePath to TLS CA certificate file
tls.skip_verifyboolfalseSkip TLS verification
schema_registryobjectfalseSchema Registry configuration
schema_registry.urlstringfalseSchema Registry URL
schema_registry.configstringfalseAdditional Schema Registry configuration
schema_registry.enabledboolfalseWhether to use Schema Registry
schema_registry.skip_verifyboolfalseSkip TLS certificate verification
include_partition_infoboolfalseWhether to include partition information in metadata
include_topic_configboolfalseWhether to include topic configuration in metadata

Available Metadata

Topic

FieldTypeDescription
topic_namestringName of the Kafka topic
partition_countint32Number of partitions
replication_factorint16Replication factor
retention_msstringMessage retention period in milliseconds
retention_bytesstringMaximum size of the topic in bytes
cleanup_policystringTopic cleanup policy
min_insync.replicasstringMinimum number of in-sync replicas
max_message.bytesstringMaximum message size in bytes
segment_bytesstringSegment file size in bytes
segment_msstringSegment file roll time in milliseconds
delete_retention_msstringTime to retain deleted segments in milliseconds
value_schema_idintID of the value schema in Schema Registry
value_schema_versionintVersion of the value schema
value_schema_typestringType of the value schema (AVRO, JSON, etc.)
value_schemastringValue schema definition
key_schema_idintID of the key schema in Schema Registry
key_schema_versionintVersion of the key schema
key_schema_typestringType of the key schema (AVRO, JSON, etc.)
key_schemastringKey schema definition

Consumer Group

FieldTypeDescription
group_idstringConsumer group ID
statestringCurrent state of the consumer group
protocolstringRebalance protocol
protocol_typestringProtocol type
subscribed_topics[]stringTopics the group is subscribed to
members[]stringMembers of the consumer group