Configuring the log visualizer

OKD uses Kibana to display the log data collected by OpenShift Logging.

You can scale Kibana for redundancy and configure the CPU and memory for your Kibana nodes.

Configuring CPU and memory limits

The OpenShift Logging components allow for adjustments to both the CPU and memory limits.

Procedure

  1. Edit the ClusterLogging custom resource (CR) in the openshift-logging project:

    1. $ oc -n openshift-logging edit ClusterLogging instance
    1. apiVersion: "logging.openshift.io/v1"
    2. kind: "ClusterLogging"
    3. metadata:
    4. name: "instance"
    5. namespace: openshift-logging
    6. ...
    7. spec:
    8. managementState: "Managed"
    9. logStore:
    10. type: "elasticsearch"
    11. elasticsearch:
    12. nodeCount: 3
    13. resources: (1)
    14. limits:
    15. memory: 16Gi
    16. requests:
    17. cpu: 200m
    18. memory: 16Gi
    19. storage:
    20. storageClassName: "gp2"
    21. size: "200G"
    22. redundancyPolicy: "SingleRedundancy"
    23. visualization:
    24. type: "kibana"
    25. kibana:
    26. resources: (2)
    27. limits:
    28. memory: 1Gi
    29. requests:
    30. cpu: 500m
    31. memory: 1Gi
    32. proxy:
    33. resources: (2)
    34. limits:
    35. memory: 100Mi
    36. requests:
    37. cpu: 100m
    38. memory: 100Mi
    39. replicas: 2
    40. collection:
    41. logs:
    42. type: "fluentd"
    43. fluentd:
    44. resources: (3)
    45. limits:
    46. memory: 736Mi
    47. requests:
    48. cpu: 200m
    49. memory: 736Mi
    1Specify the CPU and memory limits and requests for the log store as needed. For Elasticsearch, you must adjust both the request value and the limit value.
    2Specify the CPU and memory limits and requests for the log visualizer as needed.
    3Specify the CPU and memory limits and requests for the log collector as needed.

Scaling redundancy for the log visualizer nodes

You can scale the pod that hosts the log visualizer for redundancy.

Procedure

  1. Edit the ClusterLogging custom resource (CR) in the openshift-logging project:

    1. $ oc edit ClusterLogging instance
    1. $ oc edit ClusterLogging instance
    2. apiVersion: "logging.openshift.io/v1"
    3. kind: "ClusterLogging"
    4. metadata:
    5. name: "instance"
    6. ....
    7. spec:
    8. visualization:
    9. type: "kibana"
    10. kibana:
    11. replicas: 1 (1)
    1Specify the number of Kibana nodes.