@version: 3.19
@include "scl.conf"

# This is a custom syslog-ng configuration file, based in
# https://github.com/syslog-ng/syslog-ng/blob/master/packaging/debian/syslog-ng.conf

# First, set some global options.
options {
    chain_hostnames(off);
    flush_lines(0);
    use_dns(no);
    use_fqdn(no);
    owner("root");
    group("adm");
    perm(0640);
    stats_freq(0);
    bad_hostname("^gconfd$");
    ts-format("iso");
    time_zone("UTC");
    mark-freq(0);
    frac-digits(3);
};

# common block end


# source default VRF
source s_src {
    unix-stream("/dev/uds_log"
        flags(syslog-protocol)
        keep-hostname(yes)
    );
};
# end source default VRF
# remote: test1
destination d_test1_udp {
    syslog("10.0.2.5" transport("udp") ip-protocol(4) port(514) keep-alive(no) localip("10.0.2.6")
        suppress(5)
        disk-buffer(
            mem-buf-size(2097152)
            disk-buf-size(4194304)
            reliable(yes)
            dir("/tmp")
        )
    );
};
filter f_remote_test1_udp_local3 {
    facility(local3) and level(debug .. emerg);
};
filter f_remote_test1_udp {
    filter(f_remote_test1_udp_local3); };
log {
    source(s_src);
    filter(f_remote_test1_udp);
    destination(d_test1_udp);
};


destination d_test1_udp_file {
    file("/tmp/test1_udp_file.log" flags(syslog-protocol));
};
log {
    source(s_src);
    filter(f_remote_test1_udp);
    destination(d_test1_udp_file);
};

# end of remote server: test1
