百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
K

kafka-connect-splunk

> 编程语言
开源

用于 Splunk 的 Kafka 连接器

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用于 Splunk 的 Kafka 连接器

Splunk Connect for Kafka

Splunk Connect for Kafka is a Kafka Connect Sink for Splunk with the following features:

  • Data ingestion from Kafka topics into Splunk via Splunk HTTP Event Collector (HEC).
  • In-flight data transformation and enrichment.
  • Indexed Kafka events can be searched directly or used as contextual data alongside other Splunk data.

Splunk Connect for Kafka runs as a Kafka Connect plugin and does not add views to Splunk Web. Release artifacts are available from GitHub Releases and Splunkbase.

New deployments: Splunk's current product guidance recommends Splunk OpenTelemetry Connector for Kafka (SOC4Kafka). Use this connector when maintaining an existing Splunk Connect for Kafka deployment or when its behavior is specifically required. Review the official Splunk Connect for Kafka overview before selecting an ingestion path.

Documentation

  • Install Splunk Connect for Kafka
  • Upgrade Splunk Connect for Kafka
  • Configure Splunk Connect for Kafka
  • Security configurations
  • Load balancing configurations
  • Index routing configurations
  • Configuration examples
  • Troubleshooting

Requirements

  • Kafka Connect running with Kafka 1.0.0 or later.
    • Tested versions: 3.5.1, 3.6.2, 3.7.2, 3.8.1, and 3.9.0.
  • Java 8 or later.
  • Splunk platform 8.0.0 or later with a valid HTTP Event Collector (HEC) token.
    • Tested versions: 9.4.4 and 10.0.0.
    • HEC token settings should be the same on all Splunk Indexers and Heavy Forwarders in your environment.
    • Task configuration parameters will vary depending on acknowledgement setting (See the Configuration section for details).

Note: HEC Acknowledgement prevents potential data loss but may slow down event ingestion.

Supported technologies

Splunk Connect for Kafka lets you subscribe to a Kafka topic and stream the data to the Splunk HTTP event collector on the following technologies:

  • Apache Kafka
  • Amazon Managed Streaming for Apache Kafka (Amazon MSK)
  • Confluent Platform

Build

  1. Clone the repo from https://github.com/splunk/kafka-connect-splunk
  2. Verify that Java8 JRE or JDK is installed.
  3. Verify that maven is installed.
  4. Run mvn package. This will build the jar in the /target directory. The name will be splunk-kafka-connect-[VERSION].jar.

Quick Start

  1. Start your Kafka Cluster and confirm it is running.
  2. If this is a new install, create a test topic (eg: perf). Inject events into the topic. This can be done using Kafka data-gen-app or the Kafka-bundled kafka-console-producer.
  3. Within your Kafka Connect deployment adjust the values for bootstrap.servers and plugin.path inside the $KAFKA_HOME/config/connect-distributed.properties file. bootstrap.servers should be configured to point to your Kafka Brokers. plugin.path should be configured to point to the install directory of your Kafka Connect Sink and Source Connectors. For more information on installing Kafka Connect plugins please refer to the Confluent Documentation.
  4. Place the jar file created by mvn package (splunk-kafka-connect-[VERSION].jar) in or under the location specified in plugin.path
  5. Run .$KAFKA_HOME/bin/connect-distributed.sh $KAFKA_HOME/config/connect-distributed.properties to start Kafka Connect.
  6. Run the following command to create connector tasks. Adjust topics to configure the Kafka topic to be ingested, splunk.indexes to set the destination Splunk indexes, splunk.hec.token to set your HTTP Event Collector (HEC) token. For more information on Splunk HEC configuration refer to Splunk Documentation.
bash
  curl localhost:8083/connectors -X POST -H "Content-Type: application/json" -d '{
    "name": "kafka-connect-splunk",
    "config": {
      "connector.class": "com.splunk.kafka.connect.SplunkSinkConnector",
      "tasks.max": "3",
      "splunk.indexes": "",
      "topics":"",
      "splunk.hec.uri": "https://:8088",
      "splunk.hec.token": ""
    }
  }'
  1. Verify that data is flowing into your Splunk platform instance by searching using the index specified in the configuration.
  2. Use the following commands to check status, and manage connectors and tasks:
    # List active connectors
    curl http://localhost:8083/connectors

    # Get kafka-connect-splunk connector info
    curl http://localhost:8083/connectors/kafka-connect-splunk

    # Get kafka-connect-splunk connector config info
    curl http://localhost:8083/connectors/kafka-connect-splunk/config

    # Delete kafka-connect-splunk connector
    curl http://localhost:8083/connectors/kafka-connect-splunk -X DELETE

    # Get kafka-connect-splunk connector task info
    curl http://localhost:8083/connectors/kafka-connect-splunk/tasks

See the the Confluent doucumentation for additional REST examples.

Deployment

See Install Splunk Connect for Kafka for installation and administration commands, Upgrade Splunk Connect for Kafka for version replacement, and Configure Splunk Connect for Kafka for deployment and scaling guidance.

Security

Important: This connector does not configure authentication or authorization for the Kafka Connect REST API. In deployments where that API is unauthenticated, anyone who can reach it can create, inspect, update, or delete connector configurations. Connector configurations contain sensitive values such as splunk.hec.token.

Restrict access to the Kafka Connect REST API

  • Never expose Kafka Connect's REST API port 8083 directly to the public internet.
  • Bind the REST listener to a private management interface or network where possible.
  • Restrict inbound access to trusted administrative hosts and networks with firewalls, cloud security groups, or equivalent controls.

These controls are part of the Kafka Connect deployment and cannot be enforced by this connector.

If splunk.hec.ssl.enforced=false, the connector sends event data and the HEC token without TLS protection. Restrict that traffic to a trusted private network in addition to restricting access to port 8083.

See Security configurations for TLS, Kerberos, SASL/PLAIN, and SASL/SCRAM guidance.

Configuration

After Kafka Connect is brought up on every host, all of the Kafka Connect instances will form a cluster automatically. A REST call can be executed against one of the cluster instances, and the configuration will automatically propagate to all instances in the cluster.

For the complete workflow and worked configurations, see Configure Splunk Connect for Kafka and Configuration examples.

Configuration schema structure

Use the following valid JSON template to configure Splunk Connect for Kafka.

…

Use either topics or topics.regex, never both. See Configuration examples for complete requests covering common deployment patterns.

Parameters

Required Parameters

Name Description Default Value
name Connector name. A consumer group with this name will be created with tasks to be distributed evenly across the connector cluster nodes.
connector.class The Java class used to perform connector jobs. Keep the default unless you modify the connector. com.splunk.kafka.connect.SplunkSinkConnector
tasks.max The number of tasks generated to handle data collection jobs in parallel. The tasks will be spread evenly across all Splunk Kafka Connector nodes.
splunk.hec.uri Splunk HEC URIs. Either a list of FQDNs or IPs of all Splunk indexers, separated with a ",", or a load balancer. The connector will load balance to indexers using round robin. Splunk Connector will round robin to this list of indexers. https://hec1.splunk.com:8088,https://hec2.splunk.com:8088,https://hec3.splunk.com:8088
splunk.hec.token Splunk HTTP Event Collector token.
topics or topics.regex For topics: Comma separated list of Kafka topics for Splunk to consume. prod-topic1,prod-topc2,prod-topic3
For topics.regex: Use for declaring topic subscriptions as name pattern, instead of specifying each topic in a list. ^prod-topic[0-9]$
NOTE:
  1. If "topics.regex" is specified, the "topics" parameter must be omitted.
  2. With "topics.regex", the Splunk meta fields("splunk.indexes", "splunk.sourcetypes", "splunk.sources") are ignored and should be omitted.
  3. With "topics.regex" the Splunk metadata must either be defined on a per-event basis by using Kafka Header Fields("splunk.header.index", "splunk.header.sourcetype", etc.), OR it can be defined by the HEC token default index and sourcetype values.

General Optional Parameters

Name Description Default Value
splunk.indexes Target Splunk indexes to send data to. It can be a list of indexes which shall be the same sequence / order as topics. It is possible to inject data from different kafka topics to different splunk indexes. For example, prod-topic1,prod-topic2,prod-topic3 can be sent to index prod-index1,prod-index2,prod-index3.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Java

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言