首页 Linux linux – 使用rsyslogd在本地和远程进行日志记录

linux – 使用rsyslogd在本地和远程进行日志记录

如何使用rsyslog远程和本地存储日志文件? 它看起来像配置文件中的两行一样简单: *.* @loghost*.* /var/log/messages rsyslog example configs有几个像这样的发球实例.关键一: kern.* /var/adm/kernelkern.crit @finlandia;RFC3164fmtkern.crit /dev/consol

如何使用rsyslog远程和本地存储日志文件?

解决方法

它看起来像配置文件中的两行一样简单:

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

rsyslog example 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.

本文来自网络,不代表青岛站长网立场。转载请注明出处: https://www.0532zz.com/html/zhonghe/fwq/linux/20200709/5606.html
上一篇
下一篇

作者: dawei

【声明】:青岛站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

为您推荐

返回顶部