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

When full_message is <250 chars, short_message vanishes in an undocumented way #61

Open
mrmanc opened this issue Apr 10, 2018 · 0 comments

Comments

@mrmanc
Copy link

mrmanc commented Apr 10, 2018

One of our engineers was frustrated that they could not develop an aggregated Kibana visualisation as they had hoped to. They wanted to look at the frequency of errors grouped by their message. They could not use the message field as it shows as non-aggregatable in Elastic (presumably due to its length). They could not use the short_message field since it is empty when the message field is not truncated.

It took me some time to track this back to this conditional in the plugin code, as I initially assumed it was the Logstash GELF library that is used by the client that was leaving the short_message out. The docs for this plugin do not indicate that the remap functionality will actually remove the short_message in the event it matches the message field.

It seems to me that the short_message should be preserved, or that behaviour should be properly documented.

  • Version: 6.2.2
  • Operating System: CentOS
  • Config File (if you have sensitive info, please remove it):
input {
  gelf {
    id => "application_logs_gelf"
    port => 4207
    remap => true
  }
}
output {
  stdout { codec => rubydebug }
}
  • Sample Data:
{
  "version": "1.1",
  "host": "example.org",
  "short_message": "This is less than 250 characters.",
  "full_message": "This is less than 250 characters.",
  "timestamp": 1385053862.3072,
  "level": 1,
  "_user_id": 9001,
  "_some_info": "foo",
  "_some_env_var": "bar"
}
  • Steps to Reproduce:

Feed the sample data to the gelf input plugin and observe that the output does not contain short_message.

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

1 participant