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

Codecless stdout output broken with twitter input #48

Open
tylerfontaine opened this issue Feb 13, 2017 · 1 comment
Open

Codecless stdout output broken with twitter input #48

tylerfontaine opened this issue Feb 13, 2017 · 1 comment

Comments

@tylerfontaine
Copy link

  • Version: 5.2
  • Operating System: os x / centos
  • Config File (if you have sensitive info, please remove it):
input {
  twitter {
    consumer_key => 'XXX'
    consumer_secret => 'XXX'
    oauth_token => 'XXX'
    oauth_token_secret => 'XXX'
    keywords => ["test"]
    full_tweet => true
}
}

output {
  stdout { }
}

With this config, this is all that gets put to std out:

2017-02-13T21:20:07.000Z %{host} %{message}
2017-02-13T21:20:07.000Z %{host} %{message}
2017-02-13T21:20:07.000Z %{host} %{message}
2017-02-13T21:20:07.000Z %{host} %{message}
2017-02-13T21:20:07.000Z %{host} %{message}
2017-02-13T21:20:08.000Z %{host} %{message}
2017-02-13T21:20:07.000Z %{host} %{message}
2017-02-13T21:20:08.000Z %{host} %{message}
2017-02-13T21:20:08.000Z %{host} %{message}
2017-02-13T21:20:08.000Z %{host} %{message}
2017-02-13T21:20:08.000Z %{host} %{message}
2017-02-13T21:20:08.000Z %{host} %{message}

When full_tweet => false is set, stdout similarly munged, but at least the tweet comes through:

2017-02-13T21:24:02.000Z %{host} pretty sure i failed my math test but fuck man
2017-02-13T21:24:03.000Z %{host} The cardio I just did felt like the damn pacer test & I feel like I might die

If you add codec => rubydebug to the output, both conditions output as expected.

I admit, I wasn't sure if this should go here or to the stdout output. :D Let me know if I should open it there instead.

@guyboertje
Copy link

2017-02-13T21:20:08.000Z %{host} %{message} is an Event rendered as a string with field interpolation. In the example shown, when the Event does not have host or message fields the interpolation fails and the interpolation source, e.g. %{host} is shown instead of the interpolation results. With full_tweet => true set, fields other than message are set and when it is set to false then the tweet becomes the message field contents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants