📜 ⬆️ ⬇️

syslog-ng + MySQL + Net Source

The task: To raise the syslog server, with the storage of logs in the SQL database and make it possible
dump logs from other clients of routers for example

What you need: unix like OS (although this can be done even on Windows-based OS), syslog-ng, MySQL and the notion of what this fig is for.

I'll warn you right away, everything happens in the environment of gentoo linux. And go in steps.

syslog-ng
')
Installing this miracle, just do not forget to add a couple of yuz
user$ echo "app-admin/syslog-ng sql tcpd"|sudo tee -a /etc/portage/packages.use
user$ emerge -av app-admin/syslog-ng


Everything is super, then edit the config /etc/syslog-ng/syslog-ng.conf and that
It turned out that something similar to mine:

  1. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  2. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  3. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  4. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  5. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  6. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  7. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  8. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  9. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  10. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  11. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  12. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  13. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  14. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  15. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  16. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  17. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  18. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  19. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  20. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  21. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  22. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  23. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  24. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  25. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  26. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  27. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  28. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  29. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  30. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  31. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  32. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  33. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  34. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  35. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  36. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  37. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  38. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  39. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  40. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  41. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  42. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  43. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  44. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  45. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  46. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  47. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  48. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  49. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  50. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  51. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  52. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  53. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  54. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  55. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  56. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  57. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  58. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  59. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  60. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  61. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  62. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  63. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  64. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  65. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  66. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  67. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  68. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  69. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  70. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  71. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  72. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  73. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  74. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  75. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  76. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  77. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  78. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  79. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  80. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  81. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  82. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  83. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  84. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  85. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  86. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  87. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  88. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  89. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  90. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  91. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  92. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  93. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  94. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  95. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  96. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };
  97. options {
    ## general settings
    time_reopen(10); # Reopen a dead connection after this many seconds
    time_reap(120); # Close an idle destination file after this many seconds
    time_sleep(5); # Wait these many milliseconds between poll iterations
    ts_format(rfc3164); # Timestamp format: rfc3164|rfc3339|bsd|iso
    log_fifo_size(1000); # Output queue size
    log_msg_size(8192); # Max size of a single message
    log_fetch_limit(1000); # The maximum number of messages fetched from a source during a single poll loop.
    flush_lines(10); # Buffer this many lines of output (0 to send to disk immediately)
    flush_timeout(1000); # Wait at most this many milliseconds before forcibly flushing the output buffer
    mark_freq(300); # MARK line logging interval
    stats_freq(0); # Stats logging interval (0 = disabled)
    ## remote logging
    normalize_hostnames(yes); # Do normalize hostnames (transform to lower case)
    chain_hostnames(on); # Chain hostnames?
    keep_hostname(yes); # Keep the hostname the client sent?
    keep_timestamp(no); # Do not use the timestamp the client sent -- it might be wrong
    use_dns(yes); # Use DNS? Good for log servers.
    use_fqdn(no); # Use FQDNs? Good for log servers.
    dns_cache(yes); # Cache DNS results?
    dns_cache_size(1024); # Number of DNS lookup results to cache
    dns_cache_expire(3600); # Expire cached successful DNS lookup results after this many seconds
    dns_cache_expire_failed(60); # Expire cached failed DNS lookup results after this many seconds
    ## log file handling
    create_dirs(yes); # Create directories for log files if they don't exist
    dir_owner("root"); # Owner of newly created directories
    dir_group("log"); # Group of newly created directories
    dir_perm(0750); # Permissions of newly created directories
    owner("root"); # Owner of newly created log files
    group("log"); # Group of newly created log files
    perm(0640); # Permissions of newly created log files
    ## misc
    bad_hostname("^gconfd$");
    };

    #
    source src_local {
    unix-stream("/dev/log" max-connections(1000));
    internal();
    };
    # ,
    source src_kernel {
    file("/proc/kmsg" flags(kernel) log_prefix("kernel: "));
    };
    # . 0.0.0.0 -
    source src_rem { udp(ip("0.0.0.0") port(514));
    tcp(ip("0.0.0.0") port(514)); };
    # , .
    # syslogpaster - , "" , .
    destination d_my_server_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    # , ,
    template("INSERT INTO MY_SERVER (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_dslmodem_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO dslmodem (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    destination d_wifi_mysql {
    program("/usr/bin/mysql --user=syslogpaster --password='MYSUPERPASSWORD' syslog < /var/log/mysql.pipe");
    pipe ("/var/log/mysql.pipe"
    template("INSERT INTO wifi (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG','$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );")
    template-escape(yes)); };

    # .
    template t_logtty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_admintty { template("${DATE}; ${FACILITY}.${PRIORITY}; ${MSG}"); template<em>escape(no); };
    template t_local { template("${YEAR}-${MONTH}-${DAY} ${HOUR}:${MIN}:${SEC} ${TZOFFSET}; ${HOST}; ${FACILITY}.${PRIORITY}; ${MSG}"); template_escape(no); };

    # , host
    #local log to mysql
    filter f_my_server { host("MY_SERVER"); };
    log { source(src_local); source(src_kernel); filter(f_my_server); destination(d_my_server_mysql); };

    #
    #remote dslmodem(10.39.1.1)
    filter f_dslmodem { host("10.39.1.1"); };
    log { source(src_rem); filter(f_dslmodem); destination(d_dslmodem_mysql); };

    #remote wifi(10.39.0.1)
    filter f_wifi { host("10.39.0.1"); };
    log { source(src_rem); filter(f_wifi); destination(d_wifi_mysql); };


    # ,
    #log to file
    destination d_kernel { file("/var/log/kernel.log" template(t_local)); };
    log { source(src_kernel); destination(d_kernel); };
    destination d_logtty { file("/dev/tty10" template(t_logtty)); };
    log { source(src_local); source(src_kernel); destination(d_logtty); };
    destination d_messages { file("/var/log/messages" template(t_local)); };
    log { source(src_local); source(src_kernel); source(src_rem); destination(d_messages); };


Mysql
Create a database named syslog

user$ mysql -u root -p
mysql> CREATE DATABASE syslog;


We get three users:
* syslogadmin - the user has all rights to the database
* sysloguser - can only watch
* syslogpaster - can only add to the database

CREATE USER syslogadmin IDENTIFIED BY '123456789';
CREATE USER syslogadmin IDENTIFIED BY '123456';
CREATE USER syslogpaster IDENTIFIED BY '123456';

GRANT USAGE ON syslog.* TO 'syslogadmin'@'localhost';
GRANT ALL ON syslog.* TO 'syslogadmin'@'localhost';
GRANT RELOAD ON *.* TO 'syslogadmin'@'localhost';

REVOKE ALL PRIVILEGES ON syslog.* FROM 'sysloguser'@'localhost';
GRANT USAGE ON syslog.* TO 'sysloguser'@'localhost';
GRANT SELECT ON syslog.* TO 'sysloguser'@'localhost';

REVOKE ALL PRIVILEGES ON syslog.* FROM 'syslogpaster'@'localhost';
GRANT USAGE ON syslog.* TO 'syslogpaster'@'localhost';
GRANT INSERT ON syslog.* TO 'syslogpaster'@'localhost';


Now create the table. The structure of the tables is the same, just changing the names:

CREATE TABLE my_server (
host varchar(32) default NULL,
facility varchar(10) default NULL,
priority varchar(10) default NULL,
level varchar(10) default NULL,
tag varchar(10) default NULL,
date date default NULL,
time time default NULL,
program varchar(15) default NULL,
msg text,
seq int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (seq),
KEY host (host),
KEY seq (seq),
KEY program (program),
KEY time (time),
KEY date (date),
KEY priority (priority),
KEY facility (facility)
) TYPE=MyISAM;

CREATE TABLE dslmodem (
host varchar(32) default NULL,
facility varchar(10) default NULL,
priority varchar(10) default NULL,
level varchar(10) default NULL,
tag varchar(10) default NULL,
date date default NULL,
time time default NULL,
program varchar(15) default NULL,
msg text,
seq int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (seq),
KEY host (host),
KEY seq (seq),
KEY program (program),
KEY time (time),
KEY date (date),
KEY priority (priority),
KEY facility (facility)
) TYPE=MyISAM;

CREATE TABLE wifi (
host varchar(32) default NULL,
facility varchar(10) default NULL,
priority varchar(10) default NULL,
level varchar(10) default NULL,
tag varchar(10) default NULL,
date date default NULL,
time time default NULL,
program varchar(15) default NULL,
msg text,
seq int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (seq),
KEY host (host),
KEY seq (seq),
KEY program (program),
KEY time (time),
KEY date (date),
KEY priority (priority),
KEY facility (facility)
) TYPE=MyISAM;


Conclusion

Well, in general, and all run syslog-ng, although no, I completely forgot, we still have to
create a pipe
user$ sudo mkfifo /var/log/mysql.pipe
user$ sudo /etc/init.d/syslog-ng start


And everything should work)

Source: https://habr.com/ru/post/56926/


All Articles