Kafka
Core pluginmarmotdata/kafka
Discover Kafka topics from Kafka clusters
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.
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.
In the UI
Point-and-click, no config file needed.
- 1 Open
Runs→Create Pipeline - 2 Pick Kafka from the plugin list.
- 3 Fill in the wizard, set a schedule, save.
With the CLI
Save a YAML config, then run marmot ingest.
name: my-kafka-pipeline
runs:
- kafka:
bootstrap_servers: "<bootstrap_servers>"marmot ingest -c ingest.yaml Not using plugins? Other ways to populate Marmot
Configuration
12 top-level fields.
tags multiselect Tags to apply to discovered assets
external_links object[] External links to show on all assets
name string Display name for the link
icon string Icon identifier for the link
url string URL to the external resource
filter object Filter discovered assets by name (regex)
include multiselect Include patterns for resource names (regex)
exclude multiselect Exclude patterns for resource names (regex)
bootstrap_servers string Comma-separated list of bootstrap servers
client_id string Client ID for the consumer
authentication object Authentication configuration
type select Authentication type: none, sasl_plaintext, sasl_ssl, ssl
username string SASL username
password password SASL password
mechanism select SASL mechanism: PLAIN, SCRAM-SHA-256, SCRAM-SHA-512
consumer_config string Additional consumer configuration
client_timeout_seconds int Request timeout in seconds
tls object TLS configuration
enabled bool Whether to enable TLS
cert_path string Path to TLS certificate file
key_path string Path to TLS key file
ca_cert_path string Path to TLS CA certificate file
skip_verify bool Skip TLS verification
schema_registry object Schema Registry configuration
url string Schema Registry URL
config string Additional Schema Registry configuration
enabled bool Whether to use Schema Registry
skip_verify bool Skip TLS certificate verification
include_partition_info bool Whether to include partition information in metadata
true include_topic_config bool Whether to include topic configuration in metadata
true Assets Emitted
Metadata fields this plugin attaches to each discovered asset.
Kafka Topic
KafkaTopicFieldsKafkaTopicFields describes the metadata fields Kafka emits for a topic asset. It is kept as a documentation-only struct so downstream tooling can introspect the shape of the metadata map.
topic_name stringName of the Kafka topic
partition_count intNumber of partitions
replication_factor intReplication factor
retention_ms stringMessage retention period in milliseconds
retention_bytes stringMaximum size of the topic in bytes
cleanup_policy stringTopic cleanup policy
min_insync.replicas stringMinimum number of in-sync replicas
max_message.bytes stringMaximum message size in bytes
segment_bytes stringSegment file size in bytes
segment_ms stringSegment file roll time in milliseconds
delete_retention_ms stringTime to retain deleted segments in milliseconds
value_schema_id intID of the value schema in Schema Registry
value_schema_version intVersion of the value schema
value_schema_type stringType of the value schema (AVRO, JSON, etc.)
value_schema stringValue schema definition
key_schema_id intID of the key schema in Schema Registry
key_schema_version intVersion of the key schema
key_schema_type stringType of the key schema (AVRO, JSON, etc.)
key_schema stringKey schema definition
Kafka Consumer Group
KafkaConsumerGroupFieldsKafkaConsumerGroupFields describes the metadata fields for a Kafka consumer group asset.
group_id stringConsumer group ID
state stringCurrent state of the consumer group
protocol stringRebalance protocol
protocol_type stringProtocol type
subscribed_topics string[]Topics the group is subscribed to
members string[]Members of the consumer group