Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graylog2 Stream filter rule

I've got a graylog server setup and working. (version 0.9.6, with web interface). I have a stream for log entries with severity NOTICE or higher.
I want to add a filter rule to that stream which filters out all the entries with the word nagios in them (also nagios: or nagios-plugins).

I've tried adding these rules to the stream (as a full message filter):

NOT .*nagios.*
-nagios\:*
 -*nagios*
NOT *nagios*

Result of those was that the stream stopped getting log entries.

How do I add a correct filter?


2 Answers

Well, thanks to http://rubular.com and some testing this regexp works:

^((?!nagios).)*$

Just .*nagios.* should be enough.

like image 42
Lennart Koopmann Avatar answered Dec 06 '25 05:12

Lennart Koopmann