# Filebeat output to console not work

**URL:** <https://discuss.elastic.co/t/filebeat-output-to-console-not-work/56692>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [July 29, 2016, 3:11am UTC](https://discuss.elastic.co/t/filebeat-output-to-console-not-work/56692 "2016-07-29T03:11:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![caoping](https://avatars.discourse-cdn.com/v4/letter/c/aca169/32.png) [@caoping](https://discuss.elastic.co/u/caoping)\
**Post date:** [July 29, 2016, 3:11am UTC](https://discuss.elastic.co/t/filebeat-output-to-console-not-work/56692/1 "2016-07-29T03:11:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Joshua\_Rich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshua_rich/32/44953_2.png) [@Joshua\_Rich](https://discuss.elastic.co/u/Joshua_Rich)\
**Post date:** [July 29, 2016, 4:57am UTC](https://discuss.elastic.co/t/filebeat-output-to-console-not-work/56692/2 "2016-07-29T04:57:53Z")

</div>

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`).

---

<div class="post-metadata">

**Author:** ![caoping](https://avatars.discourse-cdn.com/v4/letter/c/aca169/32.png) [@caoping](https://discuss.elastic.co/u/caoping)\
**Post date:** [July 29, 2016, 5:17am UTC](https://discuss.elastic.co/t/filebeat-output-to-console-not-work/56692/3 "2016-07-29T05:17:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Joshua\_Rich](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshua_rich/32/44953_2.png) [@Joshua\_Rich](https://discuss.elastic.co/u/Joshua_Rich)\
**Post date:** [July 29, 2016, 6:21am UTC](https://discuss.elastic.co/t/filebeat-output-to-console-not-work/56692/4 "2016-07-29T06:21:40Z")

</div>

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.

> <https://github.com/elastic/beats/issues/2035>

---

<div class="post-metadata">

**Author:** ![caoping](https://avatars.discourse-cdn.com/v4/letter/c/aca169/32.png) [@caoping](https://discuss.elastic.co/u/caoping)\
**Post date:** [July 29, 2016, 6:59am UTC](https://discuss.elastic.co/t/filebeat-output-to-console-not-work/56692/5 "2016-07-29T06:59:46Z")

</div>

Thank you for your answers. 💐

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 19, 2016, 3:11am UTC](https://discuss.elastic.co/t/filebeat-output-to-console-not-work/56692/6 "2016-08-19T03:11:50Z")

</div>

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