Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to send rails logs into graylog2

I am newbie for graylog2. I installed graylog2 along with web interface. I am getting TCP syslogs into graylog server from other servers. But I am unable to send Rails logs into Graylog from other servers.

In graylog server im listening for GELF HTTP logs for port 12201 and all the required ports are open . But I am not getting any inputs into graylog server. I have configured the Rails logger as below:

#config/environments/staging.rb

config.lograge.enabled = true    
config.lograge.log_format = :graylog2     
config.logger = GELF::Logger.new("graylogserverexample.com",
                                12201, "WAN",{
                                :host => "hostname",
                                :facility => "railslog"})    

Any help would be appreciated.

like image 246
mbdvg Avatar asked Mar 16 '14 18:03

mbdvg


1 Answers

As far as I know the GELF::Logger is not sending data via HTTP, but as GELF/UDP.

If you open a GELF over UDP input on 12201 instead, everything should work.

like image 185
Kay Röpke Avatar answered Sep 23 '22 12:09

Kay Röpke