Splunk Sink
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Stable"
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
Camel JBang usage
Prerequisites
-
You’ve installed JBang.
-
You have executed the following command:
jbang app install camel@apache/camel
Supposing you have a file named route.yaml with this content:
- route:
from:
uri: "kamelet:timer-source"
parameters:
period: 10000
message: 'test'
steps:
- to:
uri: "kamelet:log-sink"
You can now run it directly through the following command
camel run route.yaml
Camel K Environment 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/v1
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/v1
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 channel:mychannel -p "sink.password=The Password" -p "sink.serverHostname=my_server_splunk.com" -p "sink.username=The Username" splunk-sink
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/v1
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/v1
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 kafka.strimzi.io/v1beta1:KafkaTopic:my-topic -p "sink.password=The Password" -p "sink.serverHostname=my_server_splunk.com" -p "sink.username=The Username" splunk-sink
This command creates the KameletBinding in the current namespace on the cluster.