Splunk Source
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Stable"
Retrieve data from Splunk and outputs in json format.
For the fields accepting time specifiers like earliestTime
, it accepts a wide variety of formats, please check Splunk documentation for more information.
Configuration Options
The following table summarizes the configuration options available for the splunk-source
Kamelet:
Property | Name | Description | Type | Default | Example |
---|---|---|---|---|---|
Password |
Required The password to authenticate to Splunk Server. |
string |
|||
Query |
Required The Splunk query to run. |
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 |
|||
Count |
The maximum number of entities to return. |
integer |
|||
Delay |
The number of milliseconds before the next poll. |
integer |
|||
Earliest Time |
Earliest time of the search time window. |
string |
05/17/22 08:35:46:456 |
||
Index |
Splunk index to write to. |
string |
|||
Init Earliest Time |
Initial start offset of the first search. |
string |
05/17/22 08:35:46:456 |
||
Latest Time |
Latest time of the search time window. |
string |
05/17/22 08:35:46:456 |
||
Protocol |
Connection Protocol to Splunk server. Enum values: * http * https |
string |
https |
||
Repeat |
The maximum number of fires. |
integer |
|||
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-source
Kamelet relies upon the presence of the following dependencies:
-
camel:jackson
-
camel:core
-
camel:splunk
-
camel:kamelet
-
mvn:com.fasterxml.jackson.datatype:jackson-datatype-joda:2.12.5
Usage
This section describes how you can use the splunk-source
.
Knative source
You can use the splunk-source
Kamelet as a Knative source by binding it to a Knative object.
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: splunk-source-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: splunk-source
properties:
password: The Password
query: The Query
serverHostname: my_server_splunk.com
username: The Username
sink:
ref:
kind: Channel
apiVersion: messaging.knative.dev/v1
name: mychannel
Prerequisite
You have Camel K installed on the cluster.
Procedure for using the cluster CLI
-
Save the
splunk-source-binding.yaml
file to your local drive, and then edit it as needed for your configuration. -
Run the source by using the following command:
kubectl apply -f splunk-source-binding.yaml
Procedure for using the Kamel CLI
Configure and run the source by using the following command:
kamel bind splunk-source -p "source.password=The Password" -p "source.query=The Query" -p "source.serverHostname=my_server_splunk.com" -p "source.username=The Username" channel:mychannel
This command creates the KameletBinding in the current namespace on the cluster.
Kafka source
You can use the splunk-source
Kamelet as a Kafka source by binding it to a Kafka topic.
apiVersion: camel.apache.org/v1alpha1
kind: KameletBinding
metadata:
name: splunk-source-binding
spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
name: splunk-source
properties:
password: The Password
query: The Query
serverHostname: my_server_splunk.com
username: The Username
sink:
ref:
kind: KafkaTopic
apiVersion: kafka.strimzi.io/v1beta1
name: my-topic
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-source-binding.yaml
file to your local drive, and then edit it as needed for your configuration. -
Run the source by using the following command:
kubectl apply -f splunk-source-binding.yaml
Procedure for using the Kamel CLI
Configure and run the source by using the following command:
kamel bind splunk-source -p "source.password=The Password" -p "source.query=The Query" -p "source.serverHostname=my_server_splunk.com" -p "source.username=The Username" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
This command creates the KameletBinding in the current namespace on the cluster.