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?

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...