rsyslog-如果条件
我的应用程序是通过UDP将日志发送到json-formatt(嵌套)的日志。
{"http": {"status_code": 400}}
我想解析此日志,并将属性用作if诸如rsyslog conf中的条件中的变量。
if ($!http!status_code >= 400) then {
/var/log/haproxy/haproxy-traffic-error.log
stop
}
这可能吗?这个问题让我现在发疯。 我已经寻找了许多有关mmjsonparse
,mmnormalize
等的文章。
My application is sending log which is json-formatted (nested) to rsyslog via UDP like below.
{"http": {"status_code": 400}}
I want to parse this log and use property as a variable in if condition like in rsyslog conf.
if ($!http!status_code >= 400) then {
/var/log/haproxy/haproxy-traffic-error.log
stop
}
Is this possible? This issue is making me crazy now.
I have looked for many articles about mmjsonparse
, mmnormalize
and etc...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论