Configure the Splunk Distribution of OpenTelemetry Collector for Kafka
Create a minimal configuration template
receivers:
kafka:
brokers: [<Brokers>]
logs:
topics:
- <Topic>
encoding: <Encoding>
processors:
resourcedetection:
detectors: ["system"]
system:
hostname_sources: ["os"]
exporters:
splunk_hec:
token: "<Splunk HEC Token>"
endpoint: <Splunk HEC Endpoint>
source: <Source>
sourcetype: <Sourcetype>
index: <Splunk index>
tls:
insecure_skip_verify: false
splunk_app_name: "soc4kafka"
sending_queue:
enabled: true
num_consumers: 10
queue_size: 10000
block_on_overflow: true
sizer: items
batch:
min_size: 1000
service:
pipelines:
logs:
receivers: [kafka]
processors: [resourcedetection]
exporters: [splunk_hec]
Configuration reference
This table describes the minimal configuration. For customization options, see the linked component documentation.
|
Category |
Component |
Parameter |
Description |
Required |
Default Value |
|---|---|---|---|---|---|
|
Receivers |
|
Kafka broker addresses for message consumption. |
Yes |
N/A |
|
|
|
Kafka list of topics to subscribe to for receiving messages. |
Yes |
N/A |
||
|
|
Encoding format of the Kafka messages. |
No |
|
||
|
Processors |
Sets a |
No |
N/A |
||
|
Exporters |
|
Splunk HTTP Event Collector (HEC) token for authentication. |
Yes |
N/A |
|
|
|
Splunk HEC endpoint URL for sending data. |
Yes |
N/A |
||
|
|
Source metadata for events sent to Splunk. |
No |
|
||
|
|
Sourcetype metadata for events sent to Splunk. |
No |
|
||
|
|
Splunk index where the logs will be stored. |
Yes |
N/A |
||
|
|
Whether to skip checking the certificate of the HEC endpoint when sending data over HTTPS. |
No |
false |
||
|
|
Maximum number of queued items waiting to be exported. |
No |
10000 |
||
|
|
Applies backpressure instead of immediately rejecting data when the exporter queue is full. |
No |
true |
||
|
|
Counts queue capacity by items. |
No |
items |
||
|
|
Enables exporter-level batching before requests are sent to Splunk HEC. |
No |
enabled |
||
|
|
Minimum number of items to batch before sending a request. |
No |
1000 |
||
|
Service |
|
Specifies the receiver(s) for the log pipeline. |
Yes |
N/A |
|
|
|
Specifies the processor(s) for the log pipeline. |
No |
|
||
|
|
Specifies the exporter(s) for the log pipeline. |
Yes |
N/A |
Example configuration
receivers:
kafka:
brokers: ["kafka-broker-1:9092", "kafka-broker-2:9092", "kafka-broker-3:9092"]
logs:
topics:
- "example-topic"
encoding: "text"
processors:
resourcedetection:
detectors: ["system"]
system:
hostname_sources: ["os"]
exporters:
splunk_hec:
token: "your-splunk-hec-token"
endpoint: "https://splunk-hec-endpoint:8088/services/collector"
source: my-kafka
sourcetype: kafka-otel
index: kafka_otel
tls:
insecure_skip_verify: false
splunk_app_name: "soc4kafka"
sending_queue:
enabled: true
num_consumers: 10
queue_size: 10000
block_on_overflow: true
sizer: items
batch:
min_size: 1000
service:
pipelines:
logs:
receivers: [kafka]
processors: [resourcedetection]
exporters: [splunk_hec]
Enter your values in the file and save it with a .yaml extension, for example, config.yaml.
For information about component roles and pipeline design, see Design the Splunk Distribution of OpenTelemetry Collector for Kafka. For deployment-specific chart values, see Configure the Helm chart.