You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/observability/v1/output_types.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1332,7 +1332,7 @@ type Splunk struct {
1332
1332
Sourcestring`json:"source,omitempty"`
1333
1333
1334
1334
// SourceType can be used to specify a pretrained or custom sourcetype in Splunk.
1335
-
// If not specified, `sourceType` will be "_json" or be determined automatically when using `payloadKey` based on the type of the final event payload.
1335
+
// If not specified, the Splunk source type used is `_json` but may be overridden when using `payloadKey`, depending on the structure of the final event payload.
Copy file name to clipboardExpand all lines: bundle/manifests/cluster-logging.clusterserviceversion.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1944,7 +1944,7 @@ spec:
1944
1944
- urn:alm:descriptor:com.tectonic.ui:text
1945
1945
- description: |-
1946
1946
SourceType can be used to specify a pretrained or custom sourcetype in Splunk.
1947
-
If not specified, `sourceType` will be "_json" or be determined automatically when using `payloadKey` based on the type of the final event payload.
1947
+
If not specified, the Splunk source type used is `_json` but may be overridden when using `payloadKey`, depending on the structure of the final event payload.
Copy file name to clipboardExpand all lines: bundle/manifests/observability.openshift.io_clusterlogforwarders.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3894,7 +3894,7 @@ spec:
3894
3894
sourceType:
3895
3895
description: |-
3896
3896
SourceType can be used to specify a pretrained or custom sourcetype in Splunk.
3897
-
If not specified, `sourceType` will be "_json" or be determined automatically when using `payloadKey` based on the type of the final event payload.
3897
+
If not specified, the Splunk source type used is `_json` but may be overridden when using `payloadKey`, depending on the structure of the final event payload.
Copy file name to clipboardExpand all lines: config/crd/bases/observability.openshift.io_clusterlogforwarders.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3894,7 +3894,7 @@ spec:
3894
3894
sourceType:
3895
3895
description: |-
3896
3896
SourceType can be used to specify a pretrained or custom sourcetype in Splunk.
3897
-
If not specified, `sourceType` will be "_json" or be determined automatically when using `payloadKey` based on the type of the final event payload.
3897
+
If not specified, the Splunk source type used is `_json` but may be overridden when using `payloadKey`, depending on the structure of the final event payload.
Copy file name to clipboardExpand all lines: config/manifests/bases/cluster-logging.clusterserviceversion.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1867,7 +1867,7 @@ spec:
1867
1867
- urn:alm:descriptor:com.tectonic.ui:text
1868
1868
- description: |-
1869
1869
SourceType can be used to specify a pretrained or custom sourcetype in Splunk.
1870
-
If not specified, `sourceType` will be "_json" or be determined automatically when using `payloadKey` based on the type of the final event payload.
1870
+
If not specified, the Splunk source type used is `_json` but may be overridden when using `payloadKey`, depending on the structure of the final event payload.
Copy file name to clipboardExpand all lines: docs/features/logforwarding/outputs/splunk-forwarding.adoc
+85-3Lines changed: 85 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,8 +65,90 @@ To ensure consistency and meaningful categorization, the `source` value can be d
65
65
following Cluster Log Forwarder's conventions.
66
66
67
67
=== `sourceType`
68
-
In Splunk, the `sourceType` field is used to format and categorise data. Splunk is bundled with many pretrained types and has the capability of defining custom types. Use this field to reference a source type defined in Splunk.
69
-
If not specified, `sourceType` will be "_json" or be determined automatically when using `payloadKey` based on the type of the final event payload.
68
+
In Splunk, the source type is used to define how incoming data should be parsed, interpreted, and categorised. Splunk includes many built-in source types and also allows for custom source types to be defined. The `sourceType` field should reference a source type configured in Splunk.
69
+
70
+
If not specified, the Splunk source type used is `_json` but may be overridden when using `payloadKey`, depending on the structure of the final event payload.
71
+
72
+
An example of a use case for this field is where a custom Splunk source type has been created to interpret particular log message content where key/value pairs are extracted and transformed into Splunk fields for use with dashboards.
73
+
74
+
Here is an example of a CLF where log events for an app are forwarded to a Splunk output sink with a user-defined source type :
75
+
76
+
```
77
+
spec:
78
+
inputs:
79
+
- application:
80
+
includes:
81
+
- container: myapp
82
+
namespace: my-app-*
83
+
name: myapp
84
+
type: application
85
+
outputs:
86
+
- name: splunk-myapp
87
+
splunk:
88
+
authentication:
89
+
token:
90
+
key: hecToken
91
+
secretName: splunk-myapp
92
+
sourceType: 'myapp:sourcetype'
93
+
url: 'https://splunk.customer.com:8088'
94
+
type: splunk
95
+
pipelines:
96
+
- name: myapp
97
+
inputRefs:
98
+
- myapp
99
+
outputRefs:
100
+
- splunk-myapp
101
+
```
102
+
103
+
If a source type needs to be referenced for a particular application's log events, but is not appropriate for others, be sure to structure the ClusterLogFowarder so that it does not misrepresent the format of log events by using a single Splunk output sink.
104
+
105
+
Here is an example of a CLF where cluster-wide general app log events are forwarded to a Splunk output sink using the default source type of `_json`, and log events for an app are forwarded to a different Splunk output sink with a user-defined source type :
106
+
107
+
```
108
+
spec:
109
+
inputs:
110
+
- name: application-general
111
+
application:
112
+
excludes:
113
+
- container: myapp
114
+
namespace: my-app-*
115
+
type: application
116
+
- name: application-myapp
117
+
application:
118
+
includes:
119
+
- container: myapp
120
+
namespace: my-app-*
121
+
type: application
122
+
outputs:
123
+
- name: splunk-application-general
124
+
splunk:
125
+
authentication:
126
+
token:
127
+
key: hecToken
128
+
secretName: splunk-application-general
129
+
url: 'https://splunk.customer.com:8088'
130
+
type: splunk
131
+
- name: splunk-application-myapp
132
+
splunk:
133
+
authentication:
134
+
token:
135
+
key: hecToken
136
+
secretName: splunk-application-myapp
137
+
sourceType: 'myapp:sourcetype'
138
+
url: 'https://splunk.customer.com:8088'
139
+
type: splunk
140
+
pipelines:
141
+
- name: splunk-application-general
142
+
inputRefs:
143
+
- application-general
144
+
outputRefs:
145
+
- splunk-application-general
146
+
- name: splunk-application-myapp
147
+
inputRefs:
148
+
- application-myapp
149
+
outputRefs:
150
+
- splunk-application-myapp
151
+
```
70
152
71
153
=== `indexedFields`
72
154
@@ -196,7 +278,7 @@ Below the table with default value depends on log_type and log_source will be us
|`sourceType`|`_json` or `generic_single_line`|`_json` or `generic_single_line`|`_json` or `generic_single_line`| Can be explicitly defined, otherwise will be determined automatically based on the type of the final event payload
281
+
|`sourceType`|`_json` or `generic_single_line`|`_json` or `generic_single_line`|`_json` or `generic_single_line`| Can be explicitly defined, otherwise will be determined based on the type of the final event payload
0 commit comments