How to enable fluent-bit debug logging

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

Environment

Rancher with Rancher-Logging chart v2

Situation

When troubleshooting the fluent-bit log level might need to be increased to debug level.

Resolution

Fluent-bit debug level logging can be changed by modifying the logLevel spec of the logging CRD

The following steps will help enable or disable debug-level logging for fluent-bit:

1. Edit rancher logging CRD
> kubectl edit logging rancher-logging-root
2. Add logLevel debug to the fluentbit spec
spec:
  controlNamespace: cattle-logging-system
  fluentbit:
    image:
      repository: rancher/mirrored-fluent-fluent-bit
      tag: 1.9.3
    logLevel: debug
3. Confirm log level is set to debug
> kubectl get pods -n cattle-logging-system -l app.kubernetes.io/name=fluentbit
NAME                                  READY   STATUS    RESTARTS   AGE
rancher-logging-root-fluentbit-gqq8l  1/1     Running   0          19s

> kubectl logs --tail=10 -n cattle-logging-system rancher-logging-root-fluentbit-gqq8l
[2023/01/13 09:44:18] [debug] [input chunk] update output instances with new chunk size diff=1841
[2023/01/13 09:44:18] [debug] [input:tail:tail.0] inode=2594165 events: IN_MODIFY
[2023/01/13 09:44:18] [debug] [input chunk] update output instances with new chunk size diff=927
[2023/01/13 09:44:18] [debug] [input:tail:tail.0] inode=2594165 events: IN_MODIFY
[2023/01/13 09:44:18] [debug] [input chunk] update output instances with new chunk size diff=1840
[2023/01/13 09:44:18] [debug] [input chunk] update output instances with new chunk size diff=1840
[2023/01/13 09:44:18] [debug] [input:tail:tail.0] inode=2594165 events: IN_MODIFY
[2023/01/13 09:44:18] [debug] [input chunk] update output instances with new chunk size diff=927
[2023/01/13 09:44:18] [debug] [input:tail:tail.0] inode=2594165 events: IN_MODIFY
[2023/01/13 09:44:18] [debug] [input chunk] update output instances with new chunk size diff=913

Notes:
  • To reset the logging level to the default info, re-run the same steps and change the logLevel to info.
  • The logLevel value is not exposed via the rancher-logging chart and cannot be configured persistently. As a result, the change will be overwritten and logLevel reset to the default of info after a rancher-logging chart upgrade.
Reference: 
  • https://banzaicloud.com/docs/one-eye/logging-operator/configuration/crds/v1beta1/fluentbit_types/#fluentbitspec-loglevel

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:000020909
  • Creation Date: 02-Mar-2023
  • Modified Date:02-Mar-2023
    • SUSE Rancher

< Back to Support Search

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

SUSE Support Forums

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

Join Our Community

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.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

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

Go to Customer Center