Filebeat output to console not work


(CaoPing) #1

I found there was a similar question here posted last year, and a guy answered that filebeat didn't support that feature yet. But now, I suppose it does. So why I'm still encountering the same error? Below is filebeat output configuration. I checked again there is only one effective output type, which is console.

Console output

console:
# Pretty print json event
pretty: true

Below is error log from filebeat.

2016-07-29T11:03:29+08:00 INFO Harvester started for file: /home/work/test.log
2016-07-29T11:03:31+08:00 CRIT Unable to publish events to console: write /dev/stdout: invalid argument
2016-07-29T11:03:31+08:00 ERR Error sending/writing event: write /dev/stdout: invalid argument
2016-07-29T11:03:31+08:00 INFO Error bulk publishing events: write /dev/stdout: invalid argument

Anybody know if any problems in my configuration? Thanks so much.


(Joshua Rich) #2

What platform are you running on, Windows or Linux? How are you starting filebeat, as a service or on the command-line directly? What version of filebeat (find out with filebeat -version).


(CaoPing) #3

Hi @Joshua_Rich
I run filebeat, which version is 1.2.3, as a service on Linux. I should run it with command line, right? Any arguments needed? I saw it said "invalid argument" in filebeat log.


(Joshua Rich) #4

Depending on your init system that manages the service, it may be configured to not provide a stdin/out for services. the console output option for filebeat is really designed for when you run filebeat directly. So you might want to try running filebeat with filebeat -c /path/to/filebeat.yml

I believe what you are encountering though is a bug, if filebeat is configured for console output and a console isn't available, it should exit. I believe the following bug is about this, and a fix for it will be in 1.3 and 5.0.0 when released.


(CaoPing) #5

Thank you for your answers. :bouquet:


(system) #6

This topic was automatically closed after 21 days. New replies are no longer allowed.