About the Cluster Logging custom resource

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)

  1. apiVersion: "logging.openshift.io/v1"
  2. kind: "ClusterLogging"
  3. metadata:
  4. name: "instance" (1)
  5. namespace: "openshift-logging" (2)
  6. spec:
  7. managementState: "Managed" (3)
  8. logStore:
  9. type: "elasticsearch" (4)
  10. retentionPolicy:
  11. application:
  12. maxAge: 1d
  13. infra:
  14. maxAge: 7d
  15. audit:
  16. maxAge: 7d
  17. elasticsearch:
  18. nodeCount: 3
  19. resources:
  20. limits:
  21. memory: 16Gi
  22. requests:
  23. cpu: 500m
  24. memory: 16Gi
  25. storage:
  26. storageClassName: "gp2"
  27. size: "200G"
  28. redundancyPolicy: "SingleRedundancy"
  29. visualization: (5)
  30. type: "kibana"
  31. kibana:
  32. resources:
  33. limits:
  34. memory: 736Mi
  35. requests:
  36. cpu: 100m
  37. memory: 736Mi
  38. replicas: 1
  39. collection: (6)
  40. logs:
  41. type: "fluentd"
  42. fluentd:
  43. resources:
  44. limits:
  45. memory: 736Mi
  46. requests:
  47. cpu: 100m
  48. memory: 736Mi
1The CR name must be instance.
2The CR must be installed to the openshift-logging namespace.
3The Red Hat OpenShift Logging Operator management state. When set to unmanaged the operator is in an unsupported state and will not get updates.
4Settings for the log store, including retention policy, the number of nodes, the resource requests and limits, and the storage class.
5Settings for the visualizer, including the resource requests and limits, and the number of pod replicas.
6Settings for the log collector, including the resource requests and limits.