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

Gelf sender override #30

Merged
merged 3 commits into from
Jun 30, 2011
Merged

Gelf sender override #30

merged 3 commits into from
Jun 30, 2011

Conversation

lusis
Copy link
Contributor

@lusis lusis commented Jun 29, 2011

Small change. Spent more time testing. Validated/tested logstash.conf with and without sender override.

@@ -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)
Copy link
Contributor

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)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JUMP ON IT.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

jordansissel added a commit that referenced this pull request Jun 30, 2011
@jordansissel jordansissel merged commit 60c3d0f into elastic:master Jun 30, 2011
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

Successfully merging this pull request may close these issues.

None yet

2 participants