Linux Logların Başka Bir Syslog Sunucuya Gönderilmesi

OMÜ wiki sitesinden

Linux'taki logların başka bir syslog sunucuya gönderilmesi için;

#vi /etc/rsyslog.conf

rsyslog.conf dosyasını açıyoruz ve aşağıdaki düzenlemeleri yapıyoruz.

##rsyslog.conf dosyasi
...
...
#### RULES ####

# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.*                                                 /dev/console

# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none                /var/log/messages

# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure
authpriv.*                                              @172.16.23.55
# Log all the mail messages in one place.
mail.*                                                  -/var/log/maillog


# Log cron stuff
cron.*                                                  /var/log/cron

# Everybody gets emergency messages
*.emerg                                                 *


Logların tipine göre, karşısına hedefi belirterek konfigurasyonu kaydetmek yeterlidir. Yukarıdaki örnekte authpriv.* (Yani kimlik doğrulama loglarını, 172.16.23.55 ip adresli sunucuya göndermesi gerektiğini belirtiyoruz.