Splunk Search

Rex Field

jwursteisen
Engager

...

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Definitely.

Try this instead of the rex

| rename _raw as raw
| rename logMessage as _raw
| extract kvdelim=":" pairdelim="~"
| rename _raw as logMessage
| rename raw as _raw

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Please check (and correct if necessary) the formatting of the second example, for instance, in the first example, the colon (:) sometimes has a space after and sometimes before as well. Since spaces are used in your pattern matching, it is important to get this as accurate as possible.

0 Karma

jwursteisen
Engager

Thank you, I looked into the formatting of the spaces. In the second event, there is no space between backendIdentifier and GFEDCBA-UUU, ceoCompanyId and EDCBA222, SOURCE_SYSTEM and SOURC1. There is a space between 'ERP_CLIENT:' and 'true'

logMessage: backendIdentifier:GFEDCBA-UUU ~ ceoCompanyId:EDCBA222 ~ SOURCE_SYSTEM:SOURC1 ~ ERP_CLIENT: true

 In the first example, there a space before and after these words:

logMessage: ceoCompanyId : ABCDE111 ~ SOURCE_SYSTEM : SOURC1 ~ ERP_CLIENT: true

Do you think this may have an effect on the missing result?

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Definitely.

Try this instead of the rex

| rename _raw as raw
| rename logMessage as _raw
| extract kvdelim=":" pairdelim="~"
| rename _raw as logMessage
| rename raw as _raw
0 Karma

jwursteisen
Engager

Excellent. That worked prefect!  Thank you very much! 

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...