Exclude the line of the log when a non desired value is found

Hi, is there a way to exclude a log line if certain value is found?

if the percent field receive a number, filter the log.

ex: Kerberos 12

if the percent field receive other type dont process the line

ex: Deimos n/a

using this grok as an example

% {DATA:name} %{NUMBER:percent}

I ask this because some times in my logs appears "n/a" instead of a number for the percentage field

If I understand the ask correctly then

if [percent] == "n/a" { drop {} }

would work.

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