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

Graylog output plugin: full_message is handled like a custom field #10024

Closed
alespour opened this issue Oct 29, 2021 · 5 comments
Closed

Graylog output plugin: full_message is handled like a custom field #10024

alespour opened this issue Oct 29, 2021 · 5 comments
Labels
bug unexpected problem or unintended behavior

Comments

@alespour
Copy link
Contributor

Relevent telegraf.conf

[[outputs.graylog]]
  ## Endpoints for your graylog instances.
  servers = ["udp://127.0.0.1:12201"]

System info

Telegraf 1.20

Docker

No response

Steps to reproduce

Graylog output plugin does not handle default gelf field "full_message" as default field. It treates it as custom field and adds "_" at beginning. Thats not correct, like "short_message" field, also full_message field must not start with underscore (see https://docs.graylog.org/en/4.0/pages/gelf.html).

Mentioned by @1tft in #9862.

  1. data with a tag or field named full_message
  2. it is sent in GELF payload as "_full_message": "whatever",

Expected behavior

full_message field name should not be prefixed with underscore.

Actual behavior

full_message field name is prefixed with underscore.

Additional info

No response

@alespour alespour added the bug unexpected problem or unintended behavior label Oct 29, 2021
@alespour
Copy link
Contributor Author

alespour commented Oct 29, 2021

Please assign this to me (alespour) if you will.

@1tft There is a configuration option short_message_field, would similar ie. full_message_field be handy do you think? Thanks!

@1tft
Copy link

1tft commented Oct 29, 2021

I dont think full_message_field is necessary, because its a bugfix. Nobody should have expected that full_message field has an underscore, because there exists no Gelf version where this is valid.
Also "short_message_field" option should be removed in future releases.

@srebhan
Copy link
Member

srebhan commented Dec 8, 2021

Hey @alespour and @1tft, does #10209 fix the issue for you?

@1tft
Copy link

1tft commented Dec 8, 2021

@srebhan Made some tests with telegraf-1.21.0~4737bebc-0.x86_64.rpm and logs successfully transferred to Graylog with all fields. Telegraf graylog output seems now to produce valid gelf.
Thank you!

@srebhan
Copy link
Member

srebhan commented Dec 8, 2021

So I'll close the issue and also the PR. If you see any issues, please open a new issue or reopen this one.

@srebhan srebhan closed this as completed Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants