Sending Filebeat logs to file instead of STDOUT

I'm trying to redirect the filebeat logs from STDOUT to a file, but they always end on my console.
Filebeat version: filebeat-6.2.1-linux-x86_64
Config:

logging.level: info
logging.to_files: true
logging.files:
  path: /tmp/mybeat
  name: mybeat
  keepfiles: 7
  permissions: 0644

I get this (and even if I create the "logs" directory mentioned in this output, there is no difference):

[user@localhost filebeat-6.2.1-linux-x86_64]# ./filebeat -e -c ./filebeat.yml
2018-02-08T17:08:36.349-0500 INFO instance/beat.go:468 Home path: [/home/user/hermes/filebeat-6.2.1-linux-x86_64] Config path: [/root/hermes/filebeat-6.2.1-linux-x86_64] Data path: [/root/hermes/filebeat-6.2.1-linux-x86_64/data] Logs path: [/root/hermes/filebeat-6.2.1-linux-x86_64/logs]
2018-02-08T17:08:36.349-0500 INFO instance/beat.go:475 Beat UUID: 801bfc70-6a38-4540-a9aa-b62c3ff4eb45
2018-02-08T17:08:36.349-0500 INFO instance/beat.go:213 Setup Beat: filebeat; Version: 6.2.1
2018-02-08T17:08:36.349-0500 INFO pipeline/module.go:76 Beat name: localhost.localdomain
2018-02-08T17:08:36.349-0500 INFO instance/beat.go:301 filebeat start running.
[...much more...]

Am I missing something in filebeat.yml ?

I found my problem: I was using the -e option.

[root@localhost filebeat-6.2.1-linux-x86_64]# ./filebeat --help
Usage:
filebeat [flags]
filebeat [command]
[...]
-e, --e Log to stderr and disable syslog/file output

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.