How to check if then else whether nummeric between 2 signs of a string

Hi there,

I have this in my logs:

check code '' is relevant
check code '589' is relevant

What I want to do in logstash:

if [field] !~ check code '/^[0-9]+$/' is relavant! 
    {
    		mutate {
    			update => {"status" => "relevant"}
    		}
    else 
    	{
    		mutate {
    			update => {"status" => "not relevant"}
    		}
    	}
    }

Will this work ?
Thanks for your help
Regards

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.