How to enable fluent-bit debug logging
This document (000020909) is provided subject to the disclaimer at the end of this document.
Environment
Situation
Resolution
The following steps will help enable or disable debug-level logging for fluent-bit:
1. Edit rancher logging CRD
> kubectl edit logging rancher-logging-root2. 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: debug3. 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.
- 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: 04-Jan-2023
- Modified Date:02-Mar-2023
-
- SUSE Rancher
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com