Skip to content

Commit 536ce06

Browse files
vparfonovopenshift-merge-bot[bot]
authored andcommitted
LOG-6623: fix example: Forwarding to Red Hat Managed Elasticsearch
Signed-off-by: Vitalii Parfonov <[email protected]>
1 parent 43c943f commit 536ce06

File tree

1 file changed

+49
-31
lines changed

1 file changed

+49
-31
lines changed

docs/administration/upgrade/v6.0_changes.adoc

Lines changed: 49 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ Previous versions without the `index` spec, would have instead written to 'app-w
686686

687687
=== Forwarding to Red Hat Managed Elasticsearch
688688
====
689-
.Complete spec including url, version and index values from labels
689+
.Complete spec including url, version and separate index for each log type
690690
[source, yaml]
691691
----
692692
apiVersion: observability.openshift.io/v1
@@ -697,12 +697,44 @@ spec:
697697
serviceAccount:
698698
name: logcollector # <1>
699699
outputs:
700-
- name: es-output-by-label # <2>
700+
- name: es-app-output # <2>
701701
type: elasticsearch
702702
elasticsearch:
703703
url: https://elasticsearch:9200
704704
version: 6
705-
index: '{.openshift.label.my_log_index||"app"}-write' # <3>
705+
index: 'app-write' # <3>
706+
tls:
707+
ca:
708+
key: ca-bundle.crt
709+
secretName: collector
710+
certificate:
711+
key: tls.crt
712+
secretName: collector
713+
key:
714+
key: tls.key
715+
secretName: collector
716+
- name: es-infra-output # <2>
717+
type: elasticsearch
718+
elasticsearch:
719+
url: https://elasticsearch:9200
720+
version: 6
721+
index: 'infra-write' # <3>
722+
tls:
723+
ca:
724+
key: ca-bundle.crt
725+
secretName: collector
726+
certificate:
727+
key: tls.crt
728+
secretName: collector
729+
key:
730+
key: tls.key
731+
secretName: collector
732+
- name: es-audit-output # <2>
733+
type: elasticsearch
734+
elasticsearch:
735+
url: https://elasticsearch:9200
736+
version: 6
737+
index: 'audit-write' # <3>
706738
tls:
707739
ca:
708740
key: ca-bundle.crt
@@ -713,45 +745,31 @@ spec:
713745
key:
714746
key: tls.key
715747
secretName: collector
716-
filters:
717-
- name: my-parse
718-
type: parse
719-
- name: my-app-label # <4>
720-
type: openshiftLabels
721-
openshiftLabels:
722-
my-log-index: app
723-
- name: my-infra-label # <5>
724-
type: openshiftLabels
725-
openshiftLabels:
726-
my-log-index: infra
727748
pipelines:
728-
- name: my-app # <6>
749+
- name: my-app # <4>
729750
inputRefs:
730751
- application
731-
filterRefs:
732-
- my-parse
733-
- my-app-label
734752
outputRefs:
735-
- es-output-by-label
736-
- name: my-infra # <7>
753+
- es-app-output
754+
- name: my-infra # <5>
737755
inputRefs:
738756
- infrastructure
739-
filterRefs:
740-
- my-parse
741-
- my-infra-label
742757
outputRefs:
743-
- es-output-by-label
758+
- es-infra-output
759+
- name: my-audit # <6>
760+
inputRefs:
761+
- audit
762+
outputRefs:
763+
- es-audit-output
744764
----
745765
<1> service account `logcollector` must have the correct permissions (see Service Accounts above)
746-
<2> `es-output-by-label` is the output used in both pipelines
747-
<3> `index` is set to read the value from `.openshift.label.my-log-index` and prepend to the string "-write" or fallback to "app-write"
748-
<4> `my-app-label` filter is used to set the label "my-log-index=app" in the pipeline
749-
<5> `my-infra-label` filter is used to set the label "my-log-index=infra" in the pipeline
750-
<6> pipeline `my-app` includes application logs and labels them `app`
751-
<7> pipeline `my-infra` includes infrastructure logs and labels them `infra`
766+
<2> `es-app-output`, `es-infra-output` and `es-audit-output` are the outputs used in pipelines for route logs by log type
767+
<3> `index` must follow naming scheme `app-*`, `infra-*` or `audit-*`
768+
<4> pipeline `my-app` includes application logs and route them to the `es-app-output`
769+
<5> pipeline `my-infra` includes infrastructure logs and route them to the `es-infra-output`
770+
<6> pipeline `my-audit` includes audit logs and route them to the `es-audit-output`
752771
753772
NOTE: In order to forward logs to the default RH-managed Elasticsearch, the `index` values must be one of `app-write`, `infra-write` or `audit-write`.
754-
This is achieved by adding a label (filter) to each pipeline, and setting the label value to the corresponding input type.
755773
====
756774

757775
=== Additional info on ES Custom Index

0 commit comments

Comments
 (0)