13

I use logger pretty regularly, but is there a FOSS command line tool for remote submission of syslog messages over the network?

Right now, I have to configure a facility/priority pair to submit to a remote server on the rsyslogd side. I'd like to cut out the middleman and not have to modify my local syslog daemon's configuration.

Does such a tool exist?

Bratchley
  • 16,684
  • 13
  • 64
  • 103

1 Answers1

15

The logger utility supports sending messages over the network

logger -n 1.2.3.4 -t myapp -p user.notice "FOO BAR!"
phemmer
  • 70,657
  • 19
  • 188
  • 223
  • I don't have an `-n` option in my version of `logger`. I'm using the one from `util-linux-2.13-0.59.el5_8` what version are you using? – Bratchley May 06 '14 at 16:19
  • 1
    Looks like this was introduced in 2.20 (https://git.kernel.org/cgit/utils/util-linux/util-linux.git/commit/misc-utils/logger.c?id=912d6b98925a34b05fb4791a2f52225b06c420af) – phemmer May 06 '14 at 17:32
  • 1
    I am using a version with a -n but my logger command still doesn't send over the network. When I strace it I can that it connects to the remote daemon but doesn't send anything. Annoying. I think you can use python to do this as well. I'll give that a go. – nic ferrier Jul 19 '14 at 13:18
  • It does not sent anything to the remote host although the remote host is on and reachable using ping command. – SuB Oct 15 '15 at 13:10