Graylog2 / Graylog2/graylog2-server
Erroneous Index Set prefix conflict
- Dominant language
- Java
- Stars
- 8.1k
- Forks
- 1.1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 217
Description
## Expected Behavior
Index Set prefixes should not conflict if they are in their entirety distinct strings, even if they start with some of the same characters.
## Current Behavior
Have existing Index Set with prefix "cisco". Create a new Index Set with prefix "ciscoasa". API complains that new Index Set prefix conflicts with existing prefix:
{"type":"ApiError","message":"Index prefix \"ciscoasa\" would conflict with existing index set prefix \"cisco\""}HTTP/1.1 100 Continue
## Possible Solution
Not sure exactly how the matching test goes for Index Set prefixes, but it appears to be based on a certain length at the start of the string. I have another instance where there are two Index Set prefixes that start with the same 2 characters but deviate after the 3rd, so there must be some matching logic that fails once the beginnings of the strings match further down the string.
Or perhaps this fails because the entirety of the "cisco" prefix matches against the other prefix "ciscoasa", which is causing the error.
Either way, I consider this a failure of the matching system.
## Steps to Reproduce (for bugs)
1. Create Index Set with prefix "cisco"
2. Attempt to create Index Set with prefix "ciscoasa"... API error from above.
## Context
Trying to create separate indices for various Cisco devices- ASA, Firepower, ISE, etc., and want the prefixes to reflect the different device types.
## Your Environment
* Graylog Version: 3.0.2
* Elasticsearch Version: 6.7.1
* MongoDB Version: 4.0.8
* Operating System: OEL-7.5
* Browser version: n/a
Contributor guide
Assessment
This issue has not been assessed yet.