Logstash - Use of Memorize plugin

前端 未结 1 1352
生来不讨喜
生来不讨喜 2021-01-24 19:02

Trying to use the \"memorize\" plugin like so:

            if [message] =~ /matching event/ {

                grok {
                    match => [ \"message         


        
相关标签:
1条回答
  • 2021-01-24 19:25

    The way that plugin works would be like this:

            if [message] =~ /matching event/ {
                grok {
                    match => [ "message", "%{mymatch:datetime}" ]
                }
            }
            # either save the datetime or add it based on last value
            memorize {
               field => 'datetime'
               default => '00:00:00'
            }
    
            if [message] =~ /another event/ {
                # datetime has already been added based on the above line
            }
    
    0 讨论(0)
提交回复
热议问题