-
Couldn't load subscription status.
- Fork 1.4k
Description
Describe the bug
Requirement:
Fluentd runs as a kubernetes container
i.) Fluentd's own logs should be redirected to a log file
ii.) Fluentd is expected to read some other data from other plugins like in_http and emit that data onto stdout.
Issue:
To achieve (i.), -o command-line option is used as suggested at https://docs.fluentd.org/deployment/logging#by-command-line-option-1
$ fluentd -o /var/log/fluentd.log
To achieve (ii.), a match with stdout output plugin is added in the config.
For ex.
<source>
@type http
port 9880
bind 0.0.0.0
tag test
</source>
<match test>
@type stdout
</match>
If we configure fluentd process to output to a log-file, it also redirects the data (tagged test) intended for stdout, into the /var/log/fluentd.log file. It does not emit anything on stdou anymore.
Is this expected?
How to avoid it such that the log location and stdout location are separate?
To Reproduce
- Configure fluentd config (as shared above)
- Start fluentd with -o option
fluentd -o /var/log/fluentd.log - Send data on the http input. For ex
curl -X POST -d 'json={"foo":"bar"}' http://localhost:9880/test
Expected behavior
Fluentd own logs must go to logfile.
Records read from http must be present on stdout of fluentd
Your Environment
- Fluentd version: 1.16.9
- Package version:5.0.7
- Operating system: Rocky Linux 8.10
- Kernel version:6.6.87.2-microsoft-standard-WSL2Your Configuration
<source>
@type http
port 9880
bind 0.0.0.0
tag test
</source>
<match test>
@type stdout
</match>Your Error Log
No error log, there is no data emitted on stdout of fluentd container.Additional context
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status