nxlog& logstash - 删除与给定EventID不匹配的消息

时间:2015-03-08 10:14:15

标签: logstash nxlog

我正在使用Nxlog将我的Windows Server日志转发到LogStash并尝试从LogStash中删除不等于给定windows eventId的消息。这个的正确语法是什么?

以下是我的尝试:

if [type] == "WindowsLog" {
            if      [EventID] <> 123
                    {

                            drop { }
            }

 if [type] == "WindowsLog" {
            if      ![EventID] == 123
                    {

                            drop { }
            }

if [type] == "WindowsLog" {
            if      [EventID] != 123
                    {

                            drop { }
            }

1 个答案:

答案 0 :(得分:0)

[EventID] == 123 这应该匹配,然后你可以放弃。