看起来就像配置文件中的两行一样简单:
*.* @loghost
*.* /var/log/messages
Run Code Online (Sandbox Code Playgroud)
该rsyslog现在例子CONFIGS有发球像这样的一些实例。关键一:
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.
Run Code Online (Sandbox Code Playgroud)
小智 5
Wouter de Bie 有一个很好的答案,但他展示了发送日志的 UDP 方法。为了通过更可靠(虽然不是 100%)的 TCP 发送它们,请使用以下内容:
\*.* @@remote.server.ip
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
23965 次 |
| 最近记录: |