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

How to override facility #25

Open
n3xus opened this issue Apr 18, 2017 · 4 comments
Open

How to override facility #25

n3xus opened this issue Apr 18, 2017 · 4 comments

Comments

@n3xus
Copy link

n3xus commented Apr 18, 2017

How to override facility?

I've tried custom_fields, add_field in filter. But no success. It's always defaulting to gelf-rb

@Slapper
Copy link

Slapper commented Dec 15, 2018

I also have the same issue here. I am try to sent gelf udp messages from logstash to graylog2 and i am always getting facility gelf-rb. Anyone find a solution here ?

@n3xus
Copy link
Author

n3xus commented Dec 16, 2018

@Slapper One ugly way is to change source code. A downside is you have to do it everytime you upgrade the plugin. Just find "gelf-rb" text in a source code and change it.

A better way is to ignore "facility" field and start using a different field for all of your applications.

@Slapper
Copy link

Slapper commented Dec 16, 2018

Thanks for the prompt response @n3xus ! I agree change source code it's an ugly thing. I probably have to go with the other option and use different fields for my apps.

Thanks again!

@Slapper
Copy link

Slapper commented Dec 17, 2018

For anyone want to disable default facility to the source code, comment the following line in :
/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/gelf-3.0.0/lib/gelf/notifier.rb

#self.default_options['facility'] ||= 'gelf-rb'

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