Linux

使用 rsyslogd 本地和遠端記錄

  • October 2, 2015

如何使用 rsyslog 遠端和本地儲存日誌文件?

看起來就像配置文件中的兩行一樣簡單:

*.* @loghost
*.* /var/log/messages

rsyslog範例配置有幾個這樣的發球實例。關鍵之一:

kern.* /var/adm/kernel
kern.crit @finlandia;RFC3164fmt
kern.crit /dev/console
kern.info;kern.!err /var/adm/kernel-info

The second statement directs all kernel messages of the priority crit and 
higher to the remote host finlandia.
[...]
The third rule directs these messages to the actual console, so the person 
who works on the machine will get them, too.

引用自:https://serverfault.com/questions/181371