OpenShift Logging
This content is authored by Red Hat experts, but has not yet been tested on every supported configuration.
A guide to shipping logs and metrics on OpenShift
Prerequisites
- OpenShift CLI (oc)
- Rights to install operators on the cluster
Setup OpenShift Logging
This is for setup of centralized logging on OpenShift making use of Elasticsearch OSS edition. This largely follows the processes outlined in the OpenShift documentation here . Retention and storage considerations are reviewed in Red Hat’s primary source documentation.
This setup is primarily concerned with simplicity and basic log searching. Consequently it is insufficient for long-lived retention or for advanced visualization of logs. For more advanced observability setups, you’ll want to look at Forwarding Logs to Third Party Systems
Create a namespace for the OpenShift Elasticsearch Operator.
This is necessary to avoid potential conflicts with community operators that could send similarly named metrics/logs into the stack.
Create a namespace for the OpenShift Logging Operator
Install the OpenShift Elasticsearch Operator by creating the following objects:
Operator Group for OpenShift Elasticsearch Operator
Subscription object to subscribe a Namespace to the OpenShift Elasticsearch Operator
Verify Operator Installation
Example Output
Install the Red Hat OpenShift Logging Operator by creating the following objects:
The Cluster Logging OperatorGroup
Subscription Object to subscribe a Namespace to the Red Hat OpenShift Logging Operator
Verify the Operator installation, the
PHASEshould beSucceeded
Example Output
Create an OpenShift Logging instance:
NOTE: For the
storageClassNamebelow, you will need to adjust for the platform on which you’re running OpenShift.managed-premiumas listed below is for Azure Red Hat OpenShift (ARO). You can verify your available storage classes withoc get storageClassesIt will take a few minutes for everything to start up. You can monitor this progress by watching the pods.
Your logging instances are now configured and recieving logs. To view them, you will need to log into your Kibana instance and create the appropriate index patterns. For more information on index patterns, see the Kibana documentation.
NOTE: The following restrictions and notes apply to index patterns:
- All users can view the
app-logs for namespaces they have access to - Only cluster-admins can view the
infra-andaudit-logs - For best accuracy, use the
@timestampfield for determining chronology
- All users can view the