Dashboards & Visualizations

Extracting BUILDING value using rex

sgulhane5
Explorer

Hi Team,

I've below extensible attributes in message tab, able to extract Assignor ID and it's Value but facing issue for BUILDING and It's Value. I guess because value is under special characters i.e. ["NOI_SEC60_GF"]] 

network_view=default extensible_attributes=[[name="Assignor ID",value="51806153"],[name="BUILDING",value=["NOI_SEC60_GF"]]

I tried few solution but it's not working. @MuS 

Thanks,

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
|rex max_match=0 field=_raw "BUILDING\",value=\[\"(?<Building>[^\"]*)\"\]"

View solution in original post

sgulhane5
Explorer

Thanks a lot @ITWhisperer 

0 Karma

sgulhane5
Explorer

Thanks, @ITWhisperer 

0 Karma

sgulhane5
Explorer

I tried below command

|rex max_match=0 field=_raw "BUILDING\",value=\"(?<Building>.*?)\s*(\w*+)\]"| eval Building= substr(Building, 1, len(Building)-1)|

Tags (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
|rex max_match=0 field=_raw "BUILDING\",value=\[\"(?<Building>[^\"]*)\"\]"

ITWhisperer
SplunkTrust
SplunkTrust

What have you tried already? If you are using rex and matching against "name" and "value", are you using max_match=0 to get more than one match?

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...