@version:3.26
@include "scl.conf"

# syslog-ng configuration file.
#
# This should behave pretty much like the original syslog on RedHat. But
# it could be configured a lot smarter.
#
# See syslog-ng(8) and syslog-ng.conf(5) for more information.
#
# Note: it also sources additional configuration files (*.conf)
#       located in /etc/syslog-ng/conf.d/

options {
    flush_lines (0);
    time_reopen (10);
    log_msg_size(8192);    
    flush_lines(1);    
    log_fifo_size(16384);  
    use_dns(yes);
    dns_cache(yes);
    use_fqdn(yes);
    keep_hostname(yes);
    chain_hostnames(yes);
    perm(0664);
    dir_perm(0775);
    dir_owner(splunk);
    dir_group (splunk);
    stats_freq(43300);
    owner (splunk);
    group (splunk);
    create_dirs(yes);
    stats-freq(600);
};

source s_sys {
    system();
    internal();
};

# Festo sources
source remote_net {
#        udp(ip(0.0.0.0) port(514) keep-hostname(yes));
#        tcp(ip(0.0.0.0) port(514) keep-hostname(yes));
        udp(ip(10.24.2.26) port(514) keep-hostname(yes));
        tcp(ip(10.24.2.26) port(514) keep-hostname(yes));
};
# Festo QRadar Gateway
destination dh_SOC { 
                  network("10.11.4.25" port("514") spoof_source(yes) transport("udp")
#                  network(
#                      ip ("10.11.4.25")
#                      port("514") 
#                      spoof_source(yes) 
#                      transport("udp")
#                      ip-protocol(4)
                   );

#
};
#
destination d_cons { file("/dev/console"); };
destination d_mesg { file("/var/log/messages"); };
destination d_auth { file("/var/log/secure"); };
destination d_mail { file("/var/log/maillog" flush_lines(10)); };
destination d_spol { file("/var/log/spooler"); };
destination d_boot { file("/var/log/boot.log"); };
destination d_cron { file("/var/log/cron"); };
destination d_kern { file("/var/log/kern"); };
destination d_mlal { usertty("*"); };
destination d_sysloghost { file("/var/log/syslog-ng.log"); };

filter f_kernel     { facility(kern); };
filter f_default    { level(info..emerg) and
                        not (facility(mail)
                        or facility(authpriv)
                        or facility(cron)); };
filter f_auth       { facility(authpriv); };
filter f_mail       { facility(mail); };
filter f_emergency  { level(emerg); };
filter f_news       { facility(uucp) or
                        (facility(news) 
                        and level(crit..emerg)); };
filter f_boot   { facility(local7); };
filter f_cron   { facility(cron); };
filter f_sysloghost {
           host("s_sys@ndelg200");
};
## Log sources not needed , because it is a docker image
log { source(s_sys); filter(f_kernel); destination(d_cons); };
log { source(s_sys); filter(f_kernel); destination(d_kern);  destination(dh_SOC); };
log { source(s_sys); filter(f_default); destination(d_mesg); destination(dh_SOC);  };
log { source(s_sys); filter(f_auth); destination(d_auth); destination(dh_SOC); };
log { source(s_sys); filter(f_mail); destination(d_mail); };
log { source(s_sys); filter(f_emergency); destination(d_mesg); destination(dh_SOC);  };
log { source(s_sys); filter(f_news); destination(d_spol); };
log { source(s_sys); filter(f_boot); destination(d_boot); destination(dh_SOC);  };
log { source(s_sys); filter(f_cron); destination(d_cron); };
log { source(s_sys); filter(f_sysloghost); destination(d_sysloghost); };

# Source additional configuration files (.conf extension only)
@include "/etc/syslog-ng/conf.d/*.conf"

