SUSE Support

Here When You Need Us

How to configure rancher-logging to send to a file

This document (000020946) is provided subject to the disclaimer at the end of this document.

Environment

Rancher 2.9.x+
Logging Operator V2


Situation

The rancher-logging operator includes an option to send logs to a file. While this approach is not ideal for production environments where logs should be shipped to a centralized location for storage and further processing. It can be a valuable tool for testing purposes to ensure that the operator is properly configured.

 

Resolution

Below is a simple way to configure logs to be sent to a file on the node. An output YAML would look like this:
apiVersion: logging.banzaicloud.io/v1beta1
kind: Output
metadata:
  name: fileoutput
  namespace: default
spec:
  file:
    path: /tmp/${tag}
 
Note the ${tag} on the path, required by Fluentd.
In this case, the logs will be available on the /tmp folder of the Pod rancher-logging-root-fluentd-0
If logs are not written to the /tmp folder, open a case with us to help you.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020946
  • Creation Date: 20-Jan-2023
  • Modified Date:15-Jan-2025
    • SUSE Rancher

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.