用于 Splunk 的 Kafka 连接器
Splunk Connect for Kafka is a Kafka Connect Sink for Splunk with the following features:
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.
Note: HEC Acknowledgement prevents potential data loss but may slow down event ingestion.
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:
mvn package. This will build the jar in the /target directory. The name will be splunk-kafka-connect-[VERSION].jar.perf). Inject events into the topic. This can be done using Kafka data-gen-app or the Kafka-bundled kafka-console-producer.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.mvn package (splunk-kafka-connect-[VERSION].jar) in or under the location specified in plugin.path.$KAFKA_HOME/bin/connect-distributed.sh $KAFKA_HOME/config/connect-distributed.properties to start Kafka Connect.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. 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": ""
}
}' # 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/tasksSee the the Confluent doucumentation for additional REST examples.
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.
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.
8083 directly to the public internet.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.
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.
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.
| 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: |
| 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,或尚未同步最近议题。