View previous topic :: View next topic |
Author |
Message |
Eistaucher n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/11650416224219f3d2d3dcc.jpg)
Joined: 21 Feb 2005 Posts: 59 Location: /home/eistaucher
|
Posted: Fri Mar 31, 2006 7:31 pm Post subject: write all logins & logouts with syslog-ng to special fil |
|
|
Hi,
does anyone of you know how to tell syslog-ng that it should log any user login and logout to a special file? e.g. /var/log/login
Thanks
Eistaucher _________________ "Nothing in life is to be feared, it is only to be understood" (Marie Curie) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
magic919 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Fri Mar 31, 2006 9:15 pm Post subject: |
|
|
http://www.campin.net/syslog-ng.conf
You just need to sort out the filter (facility auth) and state /var/log/login as the destination. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kashani Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/9629732313ee51df8c5935.jpg)
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Sat Apr 01, 2006 1:26 am Post subject: |
|
|
Here's mine which puts things in their own files. Just add what you need to your own.
Code: |
options {
long_hostnames(on);
keep_hostname(on);
use_fqdn(on);
sync(0);
stats(43200);
};
source src { unix-stream("/dev/log"); internal(); };
source kernsrc { pipe("/proc/kmsg"); };
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 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 debug { file("/var/log/debug"); };
destination messages { file("/var/log/messages"); };
destination console { usertty("root"); };
destination console_all { file("/dev/tty12"); };
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_mail { facility(mail); };
filter f_user { facility(user); };
filter f_debug { not facility(auth, authpriv, mail); };
filter f_messages { level(info..warn)
and not facility(auth, authpriv, cron, mail); };
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); };
log { source(src); filter(f_authpriv); destination(authlog); };
log { source(src); filter(f_syslog); destination(syslog); };
log { source(src); filter(f_cron); destination(cron); };
log { source(src); filter(f_daemon); destination(daemon); };
log { source(kernsrc); filter(f_kern); destination(kern); };
log { source(src); filter(f_mail); destination(mail); };
log { source(src); filter(f_user); destination(user); };
log { source(src); filter(f_debug); destination(debug); };
log { source(src); filter(f_messages); destination(messages); };
log { source(src); filter(f_emergency); destination(console); };
log { source(src); destination(console_all); };
|
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|