For example, i’ve got in my logs many entries with the field “source” containing exactly "FB100D-ADV-1" (with the double quotes).
If i take that field and click on “add to query”, the search bar is populated with: source:\"FB100D\-ADV\-1\"
The documentation says that in regex, the characters “-” and " " " (double quote) must be escaped, so far i understand. Then i try to convert that query as regex, adding the surrounding “/”. I got: source:/\"FB100D\-ADV\-[1-2]\"/
no results… you’ll understand that i search any entries with the field source equals “FB100D-ADV-1” or “FB100D-ADV-2”…
Played with it a bit but can’t come up with a good test failure… maybe you could try adding a + (one or more) or ? (zero or one) or {1} to the [1-2] to define it further?
The issue you’re having is that you need to escape the hyphens when you are searching normally, but they don’t need to be escaped when you are doing a RegEx search as they are not listed as characters requiring escaping for RegEx in ES.
Thanks for your answer. I’ll give a try to extractors, but i don’t know if it can have a impact on the performances, since these messages are firewall traffic logs, with approximately 500 messages/second.
I didn’t notice any performance issue yet Or have seen any major increase of CPU or Memory on the server. I have seen some community members talk about CPU issues but there GROK/Regex configuration were incorrect. To be honest from what I have seen @tmacgbay do with pipelines can be pretty impressive also. No matter what you do, if you have to use either one there maybe a chance of some type of increase of resources but if you keep it at a minimal level It shouldn’t be noticeable.
FYI… Here are my statistics on my ( only one ) lab firewall but I also some more and a tone of switches.