gelf-rb
gelf-rb copied to clipboard
Cannot get GELF::Notifier to send data
Hi.
I have a Graylog server configuration in place that was able to receive data submitted via this curl:
curl -XPOST http://graylog.domain.com:12201/gelf -p0 -d '{"short_message":"Hello there", "facility":"test", "tenant":"joseph", "report":"turnovers","speed":"1288"}'
Other info:
- the Graylog input is configured without any authentication.
- I have a test stream to which I'm forwarding messages when
facility==test
I'm trying to to the same via the Ruby library, but without success:
n = GELF::Notifier.new('graylog.domain.com', 12201, 'LAN', { protocol: GELF::Protocol::TCP })
n.notify!(short_message: 'this is short message', message: 'hello', facility: 'test')
What do I need to do for this to work?
Many thanks.
Tomas