たとえば 、 ルーターの他のクライアントからログを投げる
必要なもの:UNIXのようなOS(Windows OSでも実行できますが)、syslog-ng、MySQL、およびこれが必要な概念の図。
私はすぐに警告します、すべてはgentoo linuxの環境で起こります。 そして、手順に従ってください。
syslog-ng
この奇跡をインストールします。数人のユーザーを追加することを忘れないでください
user$ echo "app-admin/syslog-ng sql tcpd"|sudo tee -a /etc/portage/packages.use
user$ emerge -av app-admin/syslog-ng
すべてがスーパーです。config / etc / syslog-ng / syslog-ng.confを編集すると、
それは私のものに似たものになりました:
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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); };
-
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
syslogというデータベースを作成します
user$ mysql -u root -p
mysql> CREATE DATABASE syslog;
3人のユーザーを取得します。
* syslogadmin-ユーザーはデータベースに対するすべての権限を持っています
* sysloguser-監視のみ可能
* syslogpaster-データベースにのみ追加できます
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';
次にテーブルを作成します。 テーブルの構造は同じで、名前を変更するだけです:
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;
おわりに
まあ、一般に、私たちはすべてsyslog-ngを起動しますが、いいえ、完全に忘れていました。
パイプを作成する
user$ sudo mkfifo /var/log/mysql.pipe
user$ sudo /etc/init.d/syslog-ng start
そして、すべてが動作するはずです)