1. Describe your incident:
Hello everyone.
I am starting with graylog and I would need someone to advise me on how to correctly route incoming messages.
I have several Sophos XG and UTM firewalls. As the logs are different, I have two INPUT, one for each type of firewall and in each of them I have configured the extractors I need.
I have also configured several Stream that move messages from the “Default index” to a specific index.
Each Stream:
Properties:
Title: Stream1
Index Set: Index1
Remove matches from ‘Default Stream’: true
Stream rules:
A message must match all of the following rules:
source must match exactly X.X.X.X.X
Some of these Stream has some output configured.
So far everything seems to be fine.
Now I would need the messages received from a source to be stored in a different index depending on the value of the type_event field extracted in the extractors.
The summary would be
If source=X.X.X.X.X and the value of the Type_Event field is one of the list (type1, type2, …), then store the message in Index2.
The rest of the messages with source=X.X.X.X.X.X to be stored in Index1
The problem is that the condition “Type_Event is one of the list (type1, type2, …)” and “source must match exactly X.X.X.X.X” I don’t know how to apply them in the same stream.
I think I should use pipelines but I don’t know how to do it.
I have a single node with version open 5.2.3
I would appreciate any help or advice.
Thanks
2. Describe your environment:
-
OS Information: Ubuntu 22.04.3 LTS
-
Package Version: 5.2.3+9aee303
3. What steps have you already taken to try and solve the problem?
I have tried various combinations of rules in the streams and using pipelines but they have not worked well.
4. How can the community help?
I hope to receive some indication or example with which I can implement the rule I need.