syslog() Source/Destination Driver
The syslog() driver can be used to send and receive messages from the network using the standard IETF-syslog protocol.
Important Information
Status
How to test
Configuration Files Used
#Detination
@version: 3.31
@include "scl.conf"
options {
stats-freq(10);
time-reopen(10);
};
source custom
{
example-msg-generator(
num(1)
template("Syslog-ng instance transmitting data is live.")
);
example-msg-generator(
num(20)
freq(5)
template("Message to TCP Destination using Syslog Driver")
);
example-msg-generator(
num(20)
freq(5)
template("Message to UDP Destination using Syslog Driver")
);
};
destination d_tcp {
syslog( "127.0.0.1" port(1999) transport(tcp) );
};
destination d_udp {
syslog( "127.0.0.1" port(5060) transport(udp) );
};
destination console{
file(/dev/stdout);
};
log {
source(custom);
if (message("TCP")) {
destination(d_tcp);
} elif (message("UDP")) {
destination(d_udp);
} else {
destination(console);
};
};Proof


Last updated