IBM Cloud Docs
Logging for Red Hat OpenShift on IBM Cloud

Logging for Red Hat OpenShift on IBM Cloud

IBM Cloud services, such as Red Hat OpenShift on IBM Cloud, generate platform logs that you can use to investigate abnormal activity and critical actions in your account, and troubleshoot problems.

You can use IBM Cloud Logs Routing, a platform service, to route platform logs in your account to a destination of your choice by configuring a tenant that defines where platform logs are sent. For more information, see About Logs Routing.

You can use IBM Cloud Logs to visualize and alert on platform logs that are generated in your account and routed by IBM Cloud Logs Routing to an IBM Cloud Logs instance.

As of 28 March 2024, the IBM Log Analysis service is deprecated and is no longer supported. Learn more about IBM Cloud Logs.

Locations where logs are generated

Red Hat OpenShift on IBM Cloud logs are generated in all regions.

Locations where logs are sent to IBM Cloud Logs

Red Hat OpenShift on IBM Cloud sends logs to IBM Cloud Logs in all regions.

Locations where logs are sent by IBM Cloud Logs Routing

Red Hat OpenShift on IBM Cloud sends logs by IBM Cloud Logs Routing in all regions.

Logs that are generated

Logs are generated and written locally for all the following Red Hat OpenShift on IBM Cloud cluster components: worker nodes, containers, applications, persistent storage, Ingress application load balancer, Kubernetes API, and the kube-system namespace.

A logging agent collects logs with the extension *.log and extensionless files that are stored in the /var/log/containers directory of your pod from all namespaces, including kube-system. The agent then forwards the logs to your service instance. You can also track user-initiated administrative activity made in your cluster. Kubernetes Service automatically generates cluster management events and forwards these event logs to IBM Cloud Logs. For more information, see Getting started with IBM Cloud Logs.

To deploy a logging agent to your cluster, see Deploying the Logging agent for OpenShift clusters using a Helm chart or Deploying the Logging agent for Kubernetes clusters using a Helm chart.

Enabling logging

To enable logging for your cluster, connect your cluster to a logging service instance that exists in your IBM Cloud account. You can enable logging in existing clusters, or during cluster create time. The logging service instance must belong to the same IBM Cloud account where you created your cluster, but can be in a different resource group and IBM Cloud region than your cluster.

Note that a cluster can only be connected to one logging service instance at a time. You can change which logging service instance a cluster is connected in to in the console by disconnecting the cluster from one instance and then connecting to a different instance.

Enable logging in an existing cluster

  1. If you do not already have a logging service instance in your account, create one.
  2. In the console, navigate to the cluster resource page and click the relevant cluster.
  3. Under Integrations, find the logging option and click Connect.
  4. Select the logging service instance you want to connect to your cluster. If you have more than one logging service instance, you can filter them by the region they were created in.
  5. Click Connect.

Enable logging while creating a cluster

  1. If you do not already have a logging service instance in your account, create one.
  2. In the cluster create UI, configure you cluster as required.
  3. In the Observability integrations section, enable the Logging option.
  4. Select the instance you want to connect to your cluster.
  5. Continue configuring the cluster.

Viewing logs

To view your logs, navigate to your cluster resource page in the console and click the relevant cluster. In the Integrations section, find the Logging option and click Launch. A separate window opens where you can view your cluster logs.

Launching IBM Cloud Logs from the Observability page

For more information about launching the IBM Cloud Logs UI, see Launching the UI in the IBM Cloud Logs documentation.

Fields by log type

For information about fields included in every platform log, see Fields for platform logs.

Log record fields
Field Type Description
logSourceCRN Required Defines the account and flow log instance where the log is published.
saveServiceCopy Required Defines whether IBM saves a copy of the record for operational purposes.

Line identifiers by type

Log record fields
Identifier Description
Source The service the logs are sent from.
App The CRN of the component or service that sent the log.

Analyzing Red Hat OpenShift on IBM Cloud logs

You can view your logs to view details on events that affect your cluster components. For example, if a pod fails, you can view your logs in the dashboard to see related error messages.