Based on the advice from answer that says: Simply adding both servers and always write to both is the easiest one,
we have setup syslog-NG server on two machines that receive same syslog message and store in all_devices.log on both machines(RHEL 7.x).
Below is the configuration on both machines:
@version: 3.17
source s_network {
udp(
flags(syslog_protocol)
keep_hostname(yes)
keep_timestamp(yes)
use_dns(no)
use_fqdn(no)
);
};
destination d_all_logs {
file("/app/syslog-ng/custom/output/all_devices.log");
};
log {
source(s_network);
destination(d_all_logs);
};
Going further, we would additionally like to forward syslog messages based on filter rules, to a specific consumer, something like this:
log { source(s_network); filter(f_warn); destination(remote_log_server); };
but remote_log_server will receive two messages for every single message, as they are two syslog servers forwarding the same message.
Does Syslog-NG configuration allow de-duplication of two msgs to one syslog message?