This is a cache of https://docs.okd.io/4.8/logging/config/cluster-logging-configuring-cr.html. It is a snapshot of the page at 2024-11-22T00:49:02.215+0000.
About the Cluster <strong>logging</strong> custom resource - Configuring your <strong>logging</strong> deployment | <strong>logging</strong> | OKD 4.8
×

To configure OpenShift logging, you customize the Clusterlogging custom resource (CR).

About the Clusterlogging custom resource

To make changes to your OpenShift logging environment, create and modify the Clusterlogging custom resource (CR).

Instructions for creating or modifying a CR are provided in this documentation as appropriate.

The following example shows a typical custom resource for OpenShift logging.

Sample Clusterlogging custom resource (CR)
apiVersion: "logging.openshift.io/v1"
kind: "Clusterlogging"
metadata:
  name: "instance" (1)
  namespace: "openshift-logging" (2)
spec:
  managementState: "Managed" (3)
  logStore:
    type: "elasticsearch" (4)
    retentionPolicy:
      application:
        maxAge: 1d
      infra:
        maxAge: 7d
      audit:
        maxAge: 7d
    elasticsearch:
      nodeCount: 3
      resources:
        limits:
          memory: 16Gi
        requests:
          cpu: 500m
          memory: 16Gi
      storage:
        storageClassName: "gp2"
        size: "200G"
      redundancyPolicy: "SingleRedundancy"
  visualization: (5)
    type: "kibana"
    kibana:
      resources:
        limits:
          memory: 736Mi
        requests:
          cpu: 100m
          memory: 736Mi
      replicas: 1
  collection: (6)
    logs:
      type: "fluentd"
      fluentd:
        resources:
          limits:
            memory: 736Mi
          requests:
            cpu: 100m
            memory: 736Mi
1 The CR name must be instance.
2 The CR must be installed to the openshift-logging namespace.
3 The Red Hat OpenShift logging Operator management state. When set to unmanaged the operator is in an unsupported state and will not get updates.
4 Settings for the log store, including retention policy, the number of nodes, the resource requests and limits, and the storage class.
5 Settings for the visualizer, including the resource requests and limits, and the number of pod replicas.
6 Settings for the log collector, including the resource requests and limits.