Hello there! I'd like to create an alert for error logs with exclusion for "expected errors". Somet...
m
Hello there! I'd like to create an alert for error logs with exclusion for "expected errors". Something like
Copy code
val count = db.query(
    SELECT COUNT(*)
    FROM logs 
    WHERE level = 'ERROR' and 
    !(k8s.namespace = 'foo' & message CONTAINS 'bar') and 
    !(k8s.namespace = 'zeliboba' and logger = 'logger_name' and message LIKE '%expected%')
)

if(count > 0 ) slackAlert("<message>")
I understand how to create alerts for simple queries but I do not understand how to write "complex" queries in query builder. Could you please advice me?
s
m
Thank you @Srikanth Chekuri!