-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Gelf sender override #30
Conversation
@@ -70,7 +72,8 @@ class LogStash::Outputs::Gelf < LogStash::Outputs::Base | |||
end | |||
|
|||
m["full_message"] = (event.message) | |||
m["host"] = event["@source_host"] | |||
|
|||
m["host"] = @sender.nil? ? event["@source_host"] : event.sprintf(@sender) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can probably be better written by setting the default in the sender config:
config: sender, :validate => :string, :default => "%{@source_host}"
Then:
m["host"] = event.sprintf(@sender)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JUMP ON IT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never gonna give you up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never gonna let you down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never gonna run around and desert you.
Small change. Spent more time testing. Validated/tested logstash.conf with and without sender override.