graylog-labs / gelf-rb

Ruby GELF library (Graylog Extended Log Format)
https://rubygems.org/gems/gelf
MIT License
153 stars 104 forks source link

Cannot get GELF::Notifier to send data #71

Open landovsky opened 6 years ago

landovsky commented 6 years ago

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:

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