Question

I have some code that sits listening on a UDP port waiting to process syslog messages.

Just wondering how I can have syslog push messages (via a UDP socket) to that port?

Était-ce utile?

La solution

That depends on the syslog software you're using. If you have syslog-ng, you would create a configuration file in the 'syslog-ng/conf.d' directory with the new destination and log statement. The following is from a blog post I wrote about setting up TLS tunnels. Just change the protocol, port, destination, etc.

destination d_tls {
     tcp("your.logzilla.server" port(1999)
     tls( ca_dir("/etc/syslog-ng/ssl/")) );
 };

 log {
     source(s_src);
     destination(d_tls);
 };
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top