Skip to content

Commit 15f1b59

Browse files
authored
Merge pull request #55902 from libander/RHDEVDOCS-4427
RHDEVDOCS-4427 - Forwarding logs to Splunk
2 parents 1e9dda2 + ce67892 commit 15f1b59

File tree

2 files changed

+65
-1
lines changed

2 files changed

+65
-1
lines changed

logging/cluster-logging-external.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ include::modules/cluster-logging-collector-log-forward-cloudwatch.adoc[leveloffs
4747
[id="cluster-logging-collector-log-forward-sts-cloudwatch_{context}"]
4848
=== Forwarding logs to Amazon CloudWatch from STS enabled clusters
4949

50-
For clusters with AWS Security Token Service (STS) enabled, you can create an AWS service account manually or create a credentials request by using the
50+
For clusters with AWS Security Token Service (STS) enabled, you can create an AWS service account manually or create a credentials request by using the
5151
ifdef::openshift-enterprise,openshift-origin[]
5252
xref:../authentication/managing_cloud_provider_credentials/about-cloud-credential-operator.adoc[Cloud Credential Operator(CCO)]
5353
endif::[]
@@ -180,6 +180,8 @@ include::modules/cluster-logging-troubleshooting-loki-entry-out-of-order-errors.
180180

181181
include::modules/cluster-logging-collector-log-forward-gcp.adoc[leveloffset=+1]
182182

183+
include::modules/logging-forward-splunk.adoc[leveloffset=+1]
184+
183185
include::modules/cluster-logging-collector-log-forward-project.adoc[leveloffset=+1]
184186

185187
include::modules/cluster-logging-collector-log-forward-logs-from-application-pods.adoc[leveloffset=+1]

modules/logging-forward-splunk.adoc

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// Module included in the following assemblies:
2+
// cluster-logging-external.adoc
3+
//
4+
5+
:_content-type: PROCEDURE
6+
[id="logging-forward-splunk_{context}"]
7+
= Forwarding logs to Splunk
8+
9+
You can forward logs to the link:https://docs.splunk.com/Documentation/Splunk/9.0.0/Data/UsetheHTTPEventCollector[Splunk HTTP Event Collector (HEC)] in addition to, or instead of, the internal default {product-title} log store.
10+
11+
[NOTE]
12+
====
13+
Using this feature with Fluentd is not supported.
14+
====
15+
16+
.Prerequisites
17+
* Red Hat OpenShift Logging Operator 5.6 and higher
18+
* ClusterLogging instance with vector specified as collector
19+
* Base64 encoded Splunk HEC token
20+
21+
.Procedure
22+
23+
. Create a secret using your Base64 encoded Splunk HEC token.
24+
+
25+
[source,terminal]
26+
----
27+
$ oc -n openshift-logging create secret generic vector-splunk-secret --from-literal hecToken=<HEC_Token>
28+
----
29+
+
30+
. Create or edit the `ClusterLogForwarder` Custom Resource (CR) using the template below:
31+
+
32+
[source,yaml]
33+
----
34+
apiVersion: "logging.openshift.io/v1"
35+
kind: "ClusterLogForwarder"
36+
metadata:
37+
name: "instance" <1>
38+
namespace: "openshift-logging" <2>
39+
spec:
40+
outputs:
41+
- name: splunk-receiver <3>
42+
secret:
43+
name: vector-splunk-secret <4>
44+
type: splunk <5>
45+
url: <http://your.splunk.hec.url:8088> <6>
46+
pipelines: <7>
47+
- inputRefs:
48+
- application
49+
- infrastructure
50+
name: <8>
51+
outputRefs:
52+
- splunk-receiver <9>
53+
----
54+
<1> The name of the ClusterLogForwarder CR must be `instance`.
55+
<2> The namespace for the ClusterLogForwarder CR must be `openshift-logging`.
56+
<3> Specify a name for the output.
57+
<4> Specify the name of the secret that contains your HEC token.
58+
<5> Specify the output type as `splunk`.
59+
<6> Specify the URL (including port) of your Splunk HEC.
60+
<7> Specify which log types to forward by using the pipeline: `application`, `infrastructure`, or `audit`.
61+
<8> Optional: Specify a name for the pipeline.
62+
<9> Specify the name of the output to use when forwarding logs with this pipeline.

0 commit comments

Comments
 (0)