Splunk Search

array

vinod0313
Explorer

Hello

I have log like below

FEATURES_USING=[tokenValidatorInfo=false, requestValidationRequired=false, requestPayloadValidationRequired=false, responsePayloadValidationRequired=false, aopUsed=false, tibcoCommunicatorUsed=false, secretsSecured=false]


I want result should be like below(should splitin 2 columns)

Column1                                                                                                   column2

tokenValidatorInfo                                                                                  false

requestValidationRequired                                                                false

requestPayloadValidationRequired                                                false

-----                                                                                                               ---

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Hi @vinod0313 

An additional requirement to your previous question! here  and not a great leap to this:

| rex field=_raw "FEATURES_USING=\[(?<feature>.*)\]" 
| makemv delim=", " feature 
| mvexpand feature 
| rex field=feature "(?<Column1>[^=]*)=(?<column2>.*)"
| fields Column1,column2

 

 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

See if this helps.

| makeresults | eval _raw="FEATURES_USING=[tokenValidatorInfo=false, requestValidationRequired=false, requestPayloadValidationRequired=false, responsePayloadValidationRequired=false, aopUsed=false, tibcoCommunicatorUsed=false, secretsSecured=false]" 
```Above is just to create test data```
| extract pairdelim="[,]", kvdelim="="
| fields - FEATURES_USING _raw _time _kv
| transpose 0 column_name="column1"
| rename "row 1" as column2
---
If this reply helps you, Karma would be appreciated.
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Thank you for not using "splunk" as the subject of this posting.  It would be better still to use more than a single word.  For example: "How to parse an array?"

What have to tried so far to solve this problem?

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Unlock Database Monitoring with Splunk Observability Cloud

  In today’s fast-paced digital landscape, even minor database slowdowns can disrupt user experiences and ...

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...