提供将结构化日志消息从systemd日志导入syslog的功能。
默认配置:
module(load="imjournal" # provides access to the systemd journal
StateFile="imjournal.state") # File to store the position in the journal
有时需要禁止限速: 加入 Ratelimit.Interval=“0”
module(load="imjournal" # provides access to the systemd journal
Ratelimit.Interval="0"
StateFile="imjournal.state") # File to store the position in the journal
修改完重启syslog服务
systemctl restart rsyslog.service
Ratelimit.Interval 指定要应用速率限制的时间间隔(以秒为单位)。如果在该时间间隔内读取的消息超过了ratelimit.burst,则该时间间隔结束之 前的其他消息将被丢弃。间隔结束时(如果有任何丢弃),发出丢弃的消息数。
将此值设置为0将关闭速率限制。 请注意,不建议您关闭ratelimiting,除非您可以确定日记数据库条目不会被破坏。没有速率限制,损坏的系统日记数据库可能会导致某种服务拒绝。我们强调这一点,因为多个用户向我们报告了日记数据库的此类问题-在2013年6月,有时甚至在此之后(直到(2019年1月)。
Ratelimit.Burst 指定在 Ratelimit.interval 间隔内可以发出的最大消息数。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/170604.html原文链接:https://javaforall.cn