syslog-ng: log to remote host

I want to tell syslog-ng to log /var/log/messages to both the local and a remote syslog server. Does anyone know how to do that?

Thanks for any help.

A google on “syslog-ng”+“remote logging” gives some good info :slight_smile: A
bit more configuration than just using the -r option for syslogd.

Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.0 x86 Kernel
up 1 day 7:14, 2 users, load average: 0.04, 0.36, 0.43
GPU GeForce 6600 TE/6200 TE - Driver Version: 177.80

There’s an example in the syslog-ng.conf file:

# Enable this and adopt IP to send log messages to a log server.
#destination logserver { udp("" port(514)); };
#log { source(src); destination(logserver); };

The logserver destination spec is what you should enable and then you add that destination to the current list of enabled destinations. Naturally you have to set up the receiving end to accept log packets.

man syslog-ng.conf has more details, and there is documentation at the upstream website.