wget http://www.balabit.com/downloads/syslog-ng/2.0/src/syslog-ng-2.0rc1.tar.gz |
wget
http://www.balabit.com/downloads/syslog-ng/2.0/src/eventlog-0.2.5.tar.gz wget ftp://ftp.gtk.org/pub/glib/2.12/glib-2.12.3.tar.gz |
tar -xvvf glib-2.12.3.tar.gz cd ./glib-2.12.3 ./configure make make install cd .. tar -xzvf eventlog-0.2.5.tar.gz cd ./eventlog-0.2.5 ./configure make make install cd .. tar -xzvf syslog-ng-2.0rc1.tar.gz cd syslog-ng-2.0 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure make make install |
###This is to setup global options options { create_dirs(yes); sync(0); time_reopen (10); log_fifo_size (1000); long_hostnames(off); use_dns (yes); use_fqdn (no); keep_hostname (yes); }; ###This setups logs from the syslog-ng daemon source l_int_src { internal(); }; ###This setups the local syslog logs source l_sys_src { unix-stream("/dev/log"); }; ###This setups the local kernel logs source l_krn_src { file("/proc/kmsg"); }; ###This setups the server is listen for any normal syslog messages source r_udp_src { udp( ip (x.x.x.x) port (514)); }; ###This splits the logs recieved into hostname and date destination r_messages { file("/var/log/hosts/$HOST/$YEAR.$MONTH.$DAY/messages"); }; ###This just puts all processed logs into a "messages" file log { source(l_krn_src); source(l_sys_src); source(r_udp_src); destination(r_messages); }; |