graylog2-server
graylog2-server copied to clipboard
Stream search finds messages that doesn't belong to its index set
Expected Behavior
Stream search should only find messages that corresponds to its index set
Current Behavior
Stream search finds all messages matching its rules (even if they stored in different index sets, but it's true only for rotated indexes)
Possible Solution
Remove stream tag from the message if that stream doesn't belong to its index set
Steps to Reproduce
- Create two streams with similar rule sets that belong to different index sets
- Enable checkbox "Remove matches from 'All messages' stream" for the stream
- Load messages that should go to both streams
- Rotate their indexes
- Search
Context
We have two streams with similar rules: D2Requests and D2UserRequests (one of them is a subset of the other one), they belong to different index sets (first one -- default "graylog_", second -- custom with a longer lifetime "lt_graylog_").
When you search in D2UserRequests stream there are duplicate messages but only for a rotated "default" indexes:
Default index has been rotated at ~11:20.
Same message, same stream -- different indexes.
If you search "All messages" stream for messages that applied to D2UserRequests rules it finds nothing, so checkbox is working there.
Your Environment
- Graylog Version: 2.4.3+2c41897
- Elasticsearch Version: 5.6.4
- MongoDB Version: 3.4.10
- Operating System: Linux 4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec 4 15:57:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux