from wiki
This commit is contained in:
parent
0536acbe16
commit
b0a2a2f24a
1 changed files with 46 additions and 0 deletions
46
pages/LogToEmail.md
Normal file
46
pages/LogToEmail.md
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Configuring Logging to Email
|
||||
|
||||
We assume you have installed syslog-ng, exim, mail-utils, ...
|
||||
|
||||
```
|
||||
cat > /etc/logrotate.d/syslog-ng
|
||||
/var/log/syslog
|
||||
{
|
||||
rotate 7
|
||||
daily
|
||||
missingok
|
||||
notifempty
|
||||
delaycompress
|
||||
compress
|
||||
mailfirst
|
||||
mail randy@psg.com
|
||||
postrotate
|
||||
invoke-rc.d syslog-ng reload > /dev/null
|
||||
endscript
|
||||
}
|
||||
|
||||
/var/log/mail.info
|
||||
/var/log/mail.warn
|
||||
/var/log/mail.err
|
||||
/var/log/mail.log
|
||||
/var/log/daemon.log
|
||||
/var/log/kern.log
|
||||
/var/log/auth.log
|
||||
/var/log/user.log
|
||||
/var/log/lpr.log
|
||||
/var/log/cron.log
|
||||
/var/log/debug
|
||||
/var/log/messages
|
||||
{
|
||||
rotate 4
|
||||
weekly
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
delaycompress
|
||||
sharedscripts
|
||||
postrotate
|
||||
invoke-rc.d syslog-ng reload > /dev/null
|
||||
endscript
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue