Getting Data In

how to break our comma separated values in results

Dallastek1
Path Finder

Im trying to break out the comma separated values in my results but im brain farting. I want to break out the specific reasons - {New Geo-Location=NEGATIVE, New Device=POSITIVE, New IP=NEGATIVE, New State=NEGATIVE, New Country=NEGATIVE, Velocity=NEGATIVE, New City=NEGATIVE}

index="okta" actor.alternateId="*mydomain*" outcome.reason=*CHALLENGE* client.geographicalContext.country!="" actor.displayName!="Okta System" AND NOT "okta_svc_acct"
| bin _time span=45d
| stats count by outcome.reason, debugContext.debugData.behaviors
| sort -count

outcome.reasondebugContext.debugData.behaviors
Sign-on policy evaluation resulted in CHALLENGE{New Geo-Location=NEGATIVE, New Device=POSITIVE, New IP=NEGATIVE, New State=NEGATIVE, New Country=NEGATIVE, Velocity=NEGATIVE, New City=NEGATIVE}
Sign-on policy evaluation resulted in CHALLENGE{New Geo-Location=NEGATIVE, New Device=NEGATIVE, New IP=NEGATIVE, New State=NEGATIVE, New Country=NEGATIVE, Velocity=NEGATIVE, New City=NEGATIVE}
Sign-on policy evaluation resulted in CHALLENGE{New Geo-Location=NEGATIVE, New Device=POSITIVE, New IP=POSITIVE, New State=NEGATIVE, New Country=NEGATIVE, Velocity=NEGATIVE, New City=NEGATIVE}
Sign-on policy evaluation resulted in CHALLENGE{New Geo-Location=POSITIVE, New Device=POSITIVE, New IP=POSITIVE, New State=NEGATIVE, New Country=NEGATIVE, Velocity=NEGATIVE, New City=POSITIVE}
Sign-on policy evaluation resulted in CHALLENGE{New Geo-Location=NEGATIVE, New Device=NEGATIVE, New IP=POSITIVE, New State=NEGATIVE, New Country=NEGATIVE, Velocity=NEGATIVE, New City=NEGATIVE}
Labels (1)
Tags (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

The split function can break up the field for you.

index="okta" actor.alternateId="*mydomain*" outcome.reason=*CHALLENGE* client.geographicalContext.country!="" actor.displayName!="Okta System" AND NOT "okta_svc_acct"
``` The trim function removes the braces from the ends of the field ```
| eval behaviors=split(trim('debugContext.debugData.behaviors', "{}"),",")
| mvexpand behaviors
| bin _time span=45d
| stats count by outcome.reason, behaviors
| sort -count
---
If this reply helps you, Karma would be appreciated.

View solution in original post

Dallastek1
Path Finder

That worked! thanks!

 

richgalloway
SplunkTrust
SplunkTrust

The split function can break up the field for you.

index="okta" actor.alternateId="*mydomain*" outcome.reason=*CHALLENGE* client.geographicalContext.country!="" actor.displayName!="Okta System" AND NOT "okta_svc_acct"
``` The trim function removes the braces from the ends of the field ```
| eval behaviors=split(trim('debugContext.debugData.behaviors', "{}"),",")
| mvexpand behaviors
| bin _time span=45d
| stats count by outcome.reason, behaviors
| sort -count
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

New Release | Splunk Cloud Platform 10.1.2507

Hello Splunk Community!We are thrilled to announce the General Availability of Splunk Cloud Platform 10.1.2507 ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

🗣 You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...

Splunk New Course Releases for a Changing World

Every day, the world feels like it’s moving faster with new technological breakthroughs, AI innovation, and ...