rsyslog转发到不同的端口

发布于 2025-01-09 07:44:55 字数 409 浏览 5 评论 0原文

我通过端口 513 接收系统日志日志,并尝试将其转发到端口 514(我有一个服务正在侦听这些日志)。到目前为止,我所有的尝试都没有成功。 我尝试在 /etc/rsyslog.d/ 中创建一个文件,并

:fromhost-ip, isequal, "10.20.0.1" @127.0.0.1:514

尝试将规则集添加到 /etc/rsyslog.conf 文件中:

ruleset (name="to514"){
    action(type="omfwd" Target="127.0.0.1" Port="514" Protocol="udp")
    }
input(type="imudp" port"513" ruleset="to513")

正确的方法是什么?

I am receiving syslog logs over port 513 that I am trying to forward to port 514 (where I have a service listening for them). So far, all my attempts have been unsuccessful.
I've tried making a file in /etc/rsyslog.d/ with

:fromhost-ip, isequal, "10.20.0.1" @127.0.0.1:514

I've tried adding a ruleset to the /etc/rsyslog.conf file:

ruleset (name="to514"){
    action(type="omfwd" Target="127.0.0.1" Port="514" Protocol="udp")
    }
input(type="imudp" port"513" ruleset="to513")

What is the right way to go about this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文