Run filebeat with output log


(Pablo Perez) #1

I´ve been using filebeat, and I´m trying to resolve an issue when I start it in background.
I would like to start it to throwing log information for the startup and shutdown but I cannot find a way to make it works.
This is how I´m running the program

 ./filebeat -e -c filebeat.yml &>  /var/log/filebeat.log

But checking filebeat.log it´s empty

Any idea how to run filebeat with output log?

Rergards


(Andrew Kroh) #2

./filebeat -e -c filebeat.yml -d "*" will give you very verbose output.


(Pablo Perez) #3

I need the output in a file since the program is started by ansible so I cannot see the output on console.

Regards


(Andrew Kroh) #4

You can configure logging to a file in the filebeat.yml. See the documentation.

For example:

logging:
  level: info
  to_files: true
  files:
    path: /var/log/filebeat
    name: filebeat.log
    keepfiles: 7

(Pablo Perez) #5

jesus!, how I miss that part of the conf file!, I did not seen it. Thanks!


(system) #6