Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filebeat 5.3 regression - console output returning crit errors then stops logging to output #4041

Closed
gbolo opened this issue Apr 18, 2017 · 1 comment
Labels
bug help wanted Indicates that a maintainer wants help on an issue or pull request libbeat

Comments

@gbolo
Copy link

gbolo commented Apr 18, 2017

There seems to be some regression with the latest version of filebeat in regards to console output.

Example:

# t.sh
for i in $(seq 1 20); do echo $i; sleep 1; done

# filebeat.yaml
filebeat:
  shutdown_timeout: 0s
  prospectors:
    - input_type: stdin
      encoding: utf-8

output.console:
  codec.format:
    string: '%{[message]}'

logging.level: critical
logging.to_files: false
logging.to_syslog: false

filebeat version 5.3.0 (amd64), libbeat 5.3.0
Notice how it stops at 6 and logs a CRIT to stderr

$ sh t.sh | ./filebeat -c filebeast.yaml -e
1
2017/04/18 19:11:46.026826 console.go:83: CRIT Unable to publish events to console: <nil>
2
2017/04/18 19:11:46.026872 console.go:83: CRIT Unable to publish events to console: <nil>
3
2017/04/18 19:11:46.026881 console.go:83: CRIT Unable to publish events to console: <nil>
4
2017/04/18 19:11:46.026893 console.go:83: CRIT Unable to publish events to console: <nil>
5
2017/04/18 19:11:46.026901 console.go:83: CRIT Unable to publish events to console: <nil>
6
2017/04/18 19:11:46.026909 console.go:83: CRIT Unable to publish events to console: <nil>

filebeat version 5.2.1 (amd64), libbeat 5.2.1
The formating is different because codec.format is not available on this version

sh t.sh | filebeat -c /tmp/filebeast-stdin2.yaml -e
{"@timestamp":"2017-04-18T19:12:35.603Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"1","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:36.600Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"2","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:37.601Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"3","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:38.601Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"4","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:39.602Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"5","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:40.602Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"6","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:41.603Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"7","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:42.603Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"8","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:43.603Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"9","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:44.604Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"10","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:45.604Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"11","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:46.605Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"12","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:47.605Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"13","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:48.605Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"14","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:49.606Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"15","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:50.606Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"16","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:51.607Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"17","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:52.607Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"18","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:53.608Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"19","offset":0,"source":"","type":"log"}
{"@timestamp":"2017-04-18T19:12:54.608Z","beat":{"hostname":"ee86c6ebade2","name":"ee86c6ebade2","version":"5.2.1"},"input_type":"stdin","message":"20","offset":0,"source":"","type":"log"}
@gbolo gbolo changed the title filebeat console output returning crit errors then stops logging to output filebeat 5.3 regression - console output returning crit errors then stops logging to output Apr 18, 2017
@andrewkroh
Copy link
Member

andrewkroh commented Apr 18, 2017

It looks like we lost a return statement after signaling success. This is at https://github.com/elastic/beats/blob/v5.3.0/libbeat/outputs/console/console.go#L80-L81.

This affects 5.3. Earlier versions look OK.

@andrewkroh andrewkroh added the help wanted Indicates that a maintainer wants help on an issue or pull request label Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted Indicates that a maintainer wants help on an issue or pull request libbeat
Projects
None yet
Development

No branches or pull requests

2 participants