Cloud Experts Documentation

Configuring oTEL to collect OpenShift Logs

This content is authored by Red Hat experts, but has not yet been tested on every supported configuration.

The Filelog and JournalD Receivers are a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope .

OpenShift’s Cluster Log Forwarder (CLF) is the traditional way to collect the cluster’s Audit, Infrastructure, and Application logs and forward them to a SIEMs or other central system for log aggregation and visibility. However the oTEL Operator is a bit more flexible, especially when it comes to the output options, for instance the CLF system does not support exporting to AWS S3.

In this guide we’ll explore configuring the oTEL Operator to collect these three log streams. For the sake of brevity, we’ll be using the debug exporter, which simply prints details on the logs to the collector’s own logs. Future guides will add various exporters such as AWS S3 or OCP’s LokiStack.

Prerequisites

  • A ROSA HCP cluster with Cluster Admin access (ROSA Classic or OCP on AWS should also work, but this is only tested on HCP).

Deploy Operators

  1. Deploy the OTEL Operator

  2. Deploy the operator

  3. Wait a few moments and then validate the operator is installed

Create and Configure the oTEL Collector

If you are familiar with Helm, we recommend you go with Option 1 below, if you are not familiar with helm, or you are unable to use it due to company policy, you can use Option 2 below to get just the manifests to apply.

Option 1 using Helm Locally

  1. Add the MOBB chart repository to your Helm

  2. Update your local Helm repositories

  3. Create a values file

  4. Create an OTEL Collector

  5. Skip to Validate oTEL

Option 2: Using Kubernetes manifests

  1. Create a manifest locally that we can apply by using the MOBB’s Helm-it service.

  2. Inspect the resultant OpenShift manifests at /tmp/otel.yaml

  3. Apply the manifests

Validate oTEL

  1. Verify the Pods are running

    daemon set “ocp-otel-logging-collector” successfully rolled out

  2. Check the collector is collecting logs

Conclusion

Logs are being pulled from the worker nodes, both for the Applications and Infrastructure tenants. Of course apart from showing some debug messages the logs are not flowing anywhere.

Next steps are to pick a destination such as the OpenShift LokiStack system, or AWS S3 (or both!). Examples of deploying these are coming soon!

Interested in contributing to these docs?

Collaboration drives progress. Help improve our documentation The Red Hat Way.

Red Hat logo LinkedIn YouTube Facebook Twitter

Products

Tools

Try, buy & sell

Communicate

About Red Hat

We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Subscribe to our newsletter, Red Hat Shares

Sign up now
© 2023 Red Hat, Inc.