Skip to content

Commit bec87cf

Browse files
vparfonovopenshift-merge-bot[bot]
authored andcommitted
LOG-6623: better description for 'obsclf.spec.outputs.elasticsearch.index' when log forwarding to the Red Hat Managed Elasticsearch
Signed-off-by: Vitalii Parfonov <[email protected]>
1 parent bd2e22a commit bec87cf

File tree

6 files changed

+39
-14
lines changed

6 files changed

+39
-14
lines changed

api/observability/v1/output_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,10 @@ type Elasticsearch struct {
477477
//
478478
// Static values can only contain alphanumeric characters along with dashes, underscores, dots and forward slashes.
479479
//
480+
// When forwarding logs to the Red Hat Managed Elasticsearch, the index must match the pattern ^(app|infra|audit)-write$
481+
// where the prefix depends upon the log_type. This requires defining a distinct output for each log type or distinct pipelines
482+
// with the openshiftLabels filter. See the product documentation for examples.
483+
//
480484
// Example:
481485
//
482486
// 1. foo-{.bar||"none"}

bundle/manifests/cluster-logging.clusterserviceversion.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ metadata:
8282
categories: OpenShift Optional, Logging & Tracing
8383
certified: "false"
8484
containerImage: quay.io/openshift-logging/cluster-logging-operator:latest
85-
createdAt: "2025-01-27T12:45:11Z"
85+
createdAt: "2025-02-06T14:39:16Z"
8686
description: The Red Hat OpenShift Logging Operator for OCP provides a means for
8787
configuring and managing log collection and forwarding.
8888
features.operators.openshift.io/cnf: "false"
@@ -569,10 +569,10 @@ spec:
569569
GroupName defines the strategy for grouping logstreams
570570
571571
572-
The GroupName can be a combination of static and dynamic values consisting of field paths followed by "\|\|" followed by another field path or a static value.
572+
The GroupName can be a combination of static and dynamic values consisting of field paths followed by `||` followed by another field path or a static value.
573573
574574
575-
A dynamic value is encased in single curly brackets "{}" and MUST end with a static fallback value separated with "\|\|".
575+
A dynamic value is encased in single curly brackets `{}` and MUST end with a static fallback value separated with `||`.
576576
577577
578578
Static values can only contain alphanumeric characters along with dashes, underscores, dots and forward slashes.
@@ -581,13 +581,13 @@ spec:
581581
Example:
582582
583583
584-
1. foo-{.bar\|\|"none"}
584+
1. foo-{.bar||"none"}
585585
586586
587-
2. {.foo\|\|.bar\|\|"missing"}
587+
2. {.foo||.bar||"missing"}
588588
589589
590-
3. foo.{.bar.baz\|\|.qux.quux.corge\|\|.grault\|\|"nil"}-waldo.fred{.plugh\|\|"none"}
590+
3. foo.{.bar.baz||.qux.quux.corge||.grault||"nil"}-waldo.fred{.plugh||"none"}
591591
displayName: Group Name
592592
path: outputs[0].cloudwatch.groupName
593593
x-descriptors:
@@ -696,6 +696,11 @@ spec:
696696
Static values can only contain alphanumeric characters along with dashes, underscores, dots and forward slashes.
697697
698698
699+
When forwarding logs to the Red Hat Managed Elasticsearch, the index must match the pattern ^(app|infra|audit)-write$
700+
where the prefix depends upon the log_type. This requires defining a distinct output for each log type or distinct pipelines
701+
with the openshiftLabels filter. See the product documentation for examples.
702+
703+
699704
Example:
700705
701706

bundle/manifests/observability.openshift.io_clusterlogforwarders.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,6 +1213,10 @@ spec:
12131213
12141214
Static values can only contain alphanumeric characters along with dashes, underscores, dots and forward slashes.
12151215
1216+
When forwarding logs to the Red Hat Managed Elasticsearch, the index must match the pattern ^(app|infra|audit)-write$
1217+
where the prefix depends upon the log_type. This requires defining a distinct output for each log type or distinct pipelines
1218+
with the openshiftLabels filter. See the product documentation for examples.
1219+
12161220
Example:
12171221
12181222
1. foo-{.bar||"none"}

config/crd/bases/observability.openshift.io_clusterlogforwarders.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,6 +1213,10 @@ spec:
12131213
12141214
Static values can only contain alphanumeric characters along with dashes, underscores, dots and forward slashes.
12151215
1216+
When forwarding logs to the Red Hat Managed Elasticsearch, the index must match the pattern ^(app|infra|audit)-write$
1217+
where the prefix depends upon the log_type. This requires defining a distinct output for each log type or distinct pipelines
1218+
with the openshiftLabels filter. See the product documentation for examples.
1219+
12161220
Example:
12171221
12181222
1. foo-{.bar||"none"}

config/manifests/bases/cluster-logging.clusterserviceversion.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,11 @@ spec:
619619
Static values can only contain alphanumeric characters along with dashes, underscores, dots and forward slashes.
620620
621621
622+
When forwarding logs to the Red Hat Managed Elasticsearch, the index must match the pattern ^(app|infra|audit)-write$
623+
where the prefix depends upon the log_type. This requires defining a distinct output for each log type or distinct pipelines
624+
with the openshiftLabels filter. See the product documentation for examples.
625+
626+
622627
Example:
623628
624629

docs/features/logforwarding/outputs/elasticsearch-forwarding.adoc

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@ spec:
2424
elasticsearch:
2525
url: 'https://example-elasticsearch-secure.com:9200'
2626
version: 8 # <1>
27-
index: '{.log_type||"undefined"}' # <2>
27+
index: '{.log_type||"undefined"}' # <2> <3>
2828
authentication:
2929
username:
3030
key: username
31-
secretName: es-secret # <3>
31+
secretName: es-secret # <4>
3232
password:
3333
key: password
34-
secretName: es-secret # <3>
34+
secretName: es-secret # <4>
3535
tls:
3636
ca:
37-
key: ca-bundle.crt # <4>
37+
key: ca-bundle.crt # <5>
3838
secretName: es-secret
3939
certificate:
4040
key: tls.crt
41-
secretName: es-secret # <4>
41+
secretName: es-secret # <5>
4242
key:
4343
key: tls.key
44-
secretName: es-secret # <4>
44+
secretName: es-secret # <5>
4545
pipelines:
4646
- name: my-logs
4747
inputRefs:
@@ -53,8 +53,11 @@ spec:
5353
+
5454
<1> Forwarding to an external Elasticsearch of version 8.x or greater requires the `version` field to be specified otherwise this can be omitted.
5555
<2> `index` is set to read the field value `.log_type` and falls back to "unknown" if not found
56-
<3> Use username and password to authenticate to the server
57-
<4> Enable Mutual Transport Layer Security (mTLS) between collector and elasticsearch, the spec identifies the keys and secret to the respective certificates that they represent.
56+
<3> When forwarding logs to the Red Hat Managed Elasticsearch, the index must match the pattern `^(app|infra|audit)-write$`
57+
where the prefix depends upon the `log_type`. This requires defining a distinct output for each log type or distinct
58+
pipelines with the `openshiftLabels` filter. See the product documentation for examples.
59+
<4> Use username and password to authenticate to the server
60+
<5> Enable Mutual Transport Layer Security (mTLS) between collector and elasticsearch, the spec identifies the keys and secret to the respective certificates that they represent.
5861

5962
== Custom Index Configuration
6063

0 commit comments

Comments
 (0)