On Tue, 2006-10-03 at 15:05 +0200, unspawn wrote:
> On Tue, 3 Oct 2006, Janne Pikkarainen wrote:
> 
> > On Tuesday 03 October 2006 15:44, you wrote:
> >> This could be "better" though when testing on your sample:
> >> egrep "^[^#].*(udp|tcp)\(" /etc/syslog-ng/syslog-ng.conf
> >
> > Yes, but that would be very unreliable
> 
> OK. Could you do me a favour? Could you (make and) attach a config (make 
> it a difficult one if you can) I can test with before I decide to use the 
> Chimera?
> 
> Thanks in advance!

Okay, here comes. I don't if this is a difficult one, but you may of
course of course modify it to suit your testing needs. Hopefully my
attachment comes along just fine.

Have a nice day,

Jaba
options { long_hostnames(off); sync(0); };

#source where to read log
source src { unix-stream("/dev/log"); internal(); pipe("/proc/kmsg"); };
source kernsrc { file("/proc/kmsg"); };

#define destinations
destination authlog { file("/var/log/auth.log"); };
destination syslog { file("/var/log/syslog"); };
destination cron { file("/var/log/cron.log"); };
destination daemon { file("/var/log/daemon.log"); };
destination kern { file("/var/log/kern.log"); };
destination lpr { file("/var/log/lpr.log"); };
destination user { file("/var/log/user.log"); };
destination mail { file("/var/log/mail.log"); };

destination mailinfo { file("/var/log/mail.info"); };
destination mailwarn { file("/var/log/mail.warn"); };
destination mailerr { file("/var/log/mail.err"); };

destination newscrit { file("/var/log/news/news.crit"); };
destination newserr { file("/var/log/news/news.err"); };
destination newsnotice { file("/var/log/news/news.notice"); };

destination debug { file("/var/log/debug"); };
destination messages { file("/var/log/messages"); };
destination console { usertty("root"); };
destination console_all { file("/dev/tty12"); };
destination xconsole { pipe("/dev/xconsole"); };

# Here are some wannabe-old destination lines just to bully you, unspawn
# destination loghost { udp("192.168.1.2"); };
#destination loghost { udp("192.168.1.2"); };
#    destination loghost { udp("192.168.1.2"); };
# destination loghost { udp ("192.168.1.2"); };
#destination loghost { 
#       udp ("192.168.1.2"); 
#};
#
#
destination loghost { udp("192.168.1.2"); };

## Log syslog-ng to mysql database

destination d_mysql { pipe("/var/log/mysql.pipe"
        template("INSERT INTO logs (host, facility, priority, level, tag, date,
        time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', 
'$LEVEL',
        '$TAG', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' 
);\n") 
        template-escape(yes)); 
};

#create filters
filter f_auth { facility(auth); };
filter f_authpriv { facility(auth, authpriv); };
filter f_syslog { not facility(authpriv, mail); };
filter f_cron { facility(cron); };
filter f_daemon { facility(daemon); };
filter f_kern { facility(kern); };
filter f_lpr { facility(lpr); };
filter f_mail { facility(mail); };
filter f_user { facility(user); };
filter f_debug { not facility(auth, authpriv, news, mail); };
filter f_messages { level(info..warn) 
        and not facility(auth, authpriv, mail, news); };
filter f_emergency { level(emerg); };

filter f_info { level(info); };
filter f_notice { level(notice); };
filter f_warn { level(warn); };
filter f_crit { level(crit); };
filter f_err { level(err); };
filter f_failed { match("failed"); };
filter f_denied { match("denied"); };

#connect filter and destination
log { source(src); filter(f_authpriv); destination(authlog); 
destination(d_mysql); destination(loghost); };
log { source(src); filter(f_syslog); destination(syslog); destination(d_mysql); 
destination(loghost); };
log { source(src); filter(f_cron); destination(cron); destination(d_mysql); 
destination(loghost); };
log { source(src); filter(f_daemon); destination(daemon); destination(d_mysql); 
destination(loghost); };
log { source(kernsrc); filter(f_kern); destination(kern); destination(d_mysql); 
destination(loghost); };
log { source(src); filter(f_lpr); destination(lpr); destination(d_mysql); 
destination(loghost); };
log { source(src); filter(f_mail); destination(mail); destination(d_mysql); 
destination(loghost); };
log { source(src); filter(f_user); destination(user); destination(d_mysql); 
destination(loghost); };
log { source(src); filter(f_mail); filter(f_info); destination(mailinfo); 
destination(d_mysql); destination(loghost); };
log { source(src); filter(f_mail); filter(f_warn); destination(mailwarn); 
destination(d_mysql); destination(loghost); };
log { source(src); filter(f_mail); filter(f_err); destination(mailerr); 
destination(d_mysql); destination(loghost); };

log { source(src); filter(f_debug); destination(debug); destination(d_mysql); 
destination(loghost); };
log { source(src); filter(f_messages); destination(messages); 
destination(d_mysql); destination(loghost); };
log { source(src); filter(f_emergency); destination(console); 
destination(d_mysql); destination(loghost); };

#default log
log { source(src); destination(console_all); };
log { source(src); destination(d_mysql); };


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rkhunter-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rkhunter-users

Reply via email to