Ubuntu – configure and test rsyslog to UDP socket

dockerrsyslogUbuntu

I am trying to use https://github.com/gliderlabs/logspout so I can see all the logs from my containers in one place.
I need rsyslog to listen on UDP socket on port 514. I uncommitted $ModLoad imudp and $UDPServerRun 514 in /etc/rsyslog.conf and restarted rsyslog.
In order to test it I run logger -d -n 192.168.1.121 –port 514 "hello" but I don't see anything.
The IP is my laptop IP.

Is this the correct way to configure rsyslog and is this the correct way to test it?

I am on Ubuntu 14.10 (laptop)

Thanks!

Best Answer

I am not sure what changed, but now it's working. Here are a some details that might help others: logger "hello" was enough. no need to pass any parameters.

echo hello | nc -u 172.17.42.1 514 is actually a better test since this should work from a docker container. from some reason loger "hello" doesn't work inside a container.