Splunk Sink
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Preview"
Send data to Splunk either by using "submit" or "stream" mode.
The payload MUST be in json format.
Configuration Options
The following table summarizes the configuration options available for the splunk-sink
Kamelet:
Property | Name | Description | Type | Default | Example |
---|---|---|---|---|---|
Password |
Required The password to authenticate to Splunk Server. |
string |
|||
Splunk Server Address |
Required The address of your Splunk server. |
string |
my_server_splunk.com |
||
Username |
Required The username to authenticate to Splunk Server. |
string |
|||
Splunk App |
The app name in Splunk. |
string |
|||
Connection Timeout |
Timeout in milliseconds when connecting to Splunk server. |
integer |
5000 |
||
Index |
Splunk index to write to. |
string |
|||
Mode |
The mode to publish events to Splunk. Enum values: * submit * stream |
string |
stream |
||
Protocol |
Connection Protocol to Splunk server. Enum values: * http * https |
string |
https |
||
Splunk Server Port |
The address of your Splunk server. |
integer |
8089 |
||
Source |
The source named field of the data. |
string |
|||
Source Type |
The source named field of the data. |
string |
Dependencies
At runtime, the splunk-sink
Kamelet relies upon the presence of the following dependencies:
-
camel:core
-
camel:splunk
-
camel:kamelet
Usage
This section describes how you can use the splunk-sink
.
Knative sink
You can use the splunk-sink
Kamelet as a Knative sink by binding it to a Knative object.
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: splunk-sink-binding
spec:
source:
ref:
kind: Channel
apiVersion: messaging.knative.dev/v1
name: mychannel
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: splunk-sink
properties:
password: The Password
serverHostname: my_server_splunk.com
username: The Username
Prerequisite
You have Camel K installed on the cluster.
Procedure for using the cluster CLI
-
Save the
splunk-sink-binding.yaml
file to your local drive, and then edit it as needed for your configuration. -
Run the sink by using the following command:
kubectl apply -f splunk-sink-binding.yaml
Procedure for using the Kamel CLI
Configure and run the sink by using the following command:
kamel bind splunk-sink -p "sink.password=The Password" -p "sink.serverHostname=my_server_splunk.com" -p "sink.username=The Username" channel:mychannel
This command creates the KameletBinding in the current namespace on the cluster.
Kafka sink
You can use the splunk-sink
Kamelet as a Kafka sink by binding it to a Kafka topic.
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: splunk-sink-binding
spec:
source:
ref:
kind: KafkaTopic
apiVersion: kafka.strimzi.io/v1beta1
name: my-topic
sink:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: splunk-sink
properties:
password: The Password
serverHostname: my_server_splunk.com
username: The Username
Prerequisites
-
You’ve installed Strimzi.
-
You’ve created a topic named
my-topic
in the current namespace. -
You have Camel K installed on the cluster.
Procedure for using the cluster CLI
-
Save the
splunk-sink-binding.yaml
file to your local drive, and then edit it as needed for your configuration. -
Run the sink by using the following command:
kubectl apply -f splunk-sink-binding.yaml
Procedure for using the Kamel CLI
Configure and run the sink by using the following command:
kamel bind splunk-sink -p "sink.password=The Password" -p "sink.serverHostname=my_server_splunk.com" -p "sink.username=The Username" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
This command creates the KameletBinding in the current namespace on the cluster.