From eaa875ab52a40d555c6af080c166df3f8c95246b Mon Sep 17 00:00:00 2001 From: Stephan Feurer Date: Fri, 1 Mar 2024 12:23:00 +0100 Subject: [PATCH] Vector is now the default logging collector --- class/defaults.yml | 2 +- .../ROOT/pages/how-tos/upgrade-v2.x-v3.x.adoc | 19 +++++++++++++++++++ tests/elasticsearch.yml | 4 +++- .../30_cluster_logging.yaml | 2 +- .../30_cluster_logging.yaml | 2 +- .../30_cluster_logging.yaml | 2 +- .../60_lokistack_alerts.yaml | 11 +++++++++++ .../30_cluster_logging.yaml | 2 +- 8 files changed, 38 insertions(+), 6 deletions(-) diff --git a/class/defaults.yml b/class/defaults.yml index 50a715f..c13863c 100644 --- a/class/defaults.yml +++ b/class/defaults.yml @@ -86,7 +86,7 @@ parameters: nodeSelector: node-role.kubernetes.io/infra: '' collection: - type: fluentd + type: vector clusterLogForwarding: enabled: false diff --git a/docs/modules/ROOT/pages/how-tos/upgrade-v2.x-v3.x.adoc b/docs/modules/ROOT/pages/how-tos/upgrade-v2.x-v3.x.adoc index 497bc97..c09cd72 100644 --- a/docs/modules/ROOT/pages/how-tos/upgrade-v2.x-v3.x.adoc +++ b/docs/modules/ROOT/pages/how-tos/upgrade-v2.x-v3.x.adoc @@ -3,6 +3,10 @@ Elasticsearch is deprecated. The component will deploy Lokistack by default, for keeping elasticsearch apply config below. +Fluentd collector is deprecated. +The component will deploy Vector by default, for keeping Fluentd apply config below. +Vector does not support all forwarding protocols, see https://docs.openshift.com/container-platform/4.15/logging/log_collection_forwarding/log-forwarding.html#log-forwarding-collector-outputs_log-forwarding[OpenShift Documentation]. + The parameter `clusterLogging.collector.logs` is deprecated. The component is backwards compatible, but moving the parameters to `clusterLogging.collector` is highly encouraged. @@ -32,6 +36,21 @@ parameters: <3> Set Elasticsearch in `clusterLogging` +== Keep Fluentd as Log collector + +Set `clusterLogging.collection.type` to `fluentd`: + +[source,yaml] +---- +parameters: + openshift4_logging: + clusterLogging: + collection: + type: fluentd <1> +---- +<1> Set Fluentd in `clusterLogging` + + == Move `clusterLogging.collector.logs` Move the `clusterLogging.collector.logs` parameters: diff --git a/tests/elasticsearch.yml b/tests/elasticsearch.yml index 8eb60cb..7310ac9 100644 --- a/tests/elasticsearch.yml +++ b/tests/elasticsearch.yml @@ -37,5 +37,7 @@ parameters: elasticsearch: enabled: true clusterLogging: + collection: + type: fluentd logStore: - type: lokistack + type: elasticsearch diff --git a/tests/golden/defaults/openshift4-logging/openshift4-logging/30_cluster_logging.yaml b/tests/golden/defaults/openshift4-logging/openshift4-logging/30_cluster_logging.yaml index 2ef6ec2..ec6cac6 100644 --- a/tests/golden/defaults/openshift4-logging/openshift4-logging/30_cluster_logging.yaml +++ b/tests/golden/defaults/openshift4-logging/openshift4-logging/30_cluster_logging.yaml @@ -9,7 +9,7 @@ metadata: namespace: openshift-logging spec: collection: - type: fluentd + type: vector logStore: lokistack: name: loki diff --git a/tests/golden/elasticsearch/openshift4-logging/openshift4-logging/30_cluster_logging.yaml b/tests/golden/elasticsearch/openshift4-logging/openshift4-logging/30_cluster_logging.yaml index 194095e..6481164 100644 --- a/tests/golden/elasticsearch/openshift4-logging/openshift4-logging/30_cluster_logging.yaml +++ b/tests/golden/elasticsearch/openshift4-logging/openshift4-logging/30_cluster_logging.yaml @@ -28,7 +28,7 @@ spec: infra: maxAge: 30d pruneNamespacesInterval: 15m - type: lokistack + type: elasticsearch managementState: Managed visualization: kibana: diff --git a/tests/golden/master/openshift4-logging/openshift4-logging/30_cluster_logging.yaml b/tests/golden/master/openshift4-logging/openshift4-logging/30_cluster_logging.yaml index 2ef6ec2..ec6cac6 100644 --- a/tests/golden/master/openshift4-logging/openshift4-logging/30_cluster_logging.yaml +++ b/tests/golden/master/openshift4-logging/openshift4-logging/30_cluster_logging.yaml @@ -9,7 +9,7 @@ metadata: namespace: openshift-logging spec: collection: - type: fluentd + type: vector logStore: lokistack: name: loki diff --git a/tests/golden/master/openshift4-logging/openshift4-logging/60_lokistack_alerts.yaml b/tests/golden/master/openshift4-logging/openshift4-logging/60_lokistack_alerts.yaml index f56e623..7742557 100644 --- a/tests/golden/master/openshift4-logging/openshift4-logging/60_lokistack_alerts.yaml +++ b/tests/golden/master/openshift4-logging/openshift4-logging/60_lokistack_alerts.yaml @@ -204,3 +204,14 @@ spec: severity: warning syn: 'true' syn_component: openshift4-logging + - alert: SYN_LokistackSchemaUpgradesRequired + annotations: + message: Object storage schema needs upgrade. + runbook_url: https://github.com/grafana/loki/blob/main/operator/docs/lokistack/sop.md#Lokistack-Schema-Upgrades-Required + summary: The applied storage schema config is old and should be upgraded. + expr: sum by(stack_id) (lokistack_warnings_count) > 0 + labels: + resource: '{{ $labels.stack_id}}' + severity: warning + syn: 'true' + syn_component: openshift4-logging diff --git a/tests/golden/multilineerr/openshift4-logging/openshift4-logging/30_cluster_logging.yaml b/tests/golden/multilineerr/openshift4-logging/openshift4-logging/30_cluster_logging.yaml index 2ef6ec2..ec6cac6 100644 --- a/tests/golden/multilineerr/openshift4-logging/openshift4-logging/30_cluster_logging.yaml +++ b/tests/golden/multilineerr/openshift4-logging/openshift4-logging/30_cluster_logging.yaml @@ -9,7 +9,7 @@ metadata: namespace: openshift-logging spec: collection: - type: fluentd + type: vector logStore: lokistack: name: loki