Dashboards & Visualizations

Why am I unable to extract JSON fields?

POR160893
Builder

Hi,

 

I have an index where all the data is in JSON format and I am struggling to use Regex or spath to extract the fields:

POR160893_0-1663233134326.png

I have used this but I got it from Google and I do not understand why "msi" is being used:
index=ABC sourcetype=DEF
| rex field=_raw "(?msi)(?<appNegated>\{.+\}$)"
| spath input=appNegated

How can I extract each of these JSON-embedded fields as Splunk fields to be then used in a dashboard???



Many thanks!

Labels (2)
Tags (1)
0 Karma
1 Solution

scelikok
SplunkTrust
SplunkTrust

Hi @POR160893,

Just adding a spath should be enough.

index=firemon sourcetype=firemon:rules | spath

 

If this reply helps you an upvote and "Accept as Solution" is appreciated.

View solution in original post

scelikok
SplunkTrust
SplunkTrust

Hi @POR160893,

Just adding a spath should be enough.

index=firemon sourcetype=firemon:rules | spath

 

If this reply helps you an upvote and "Accept as Solution" is appreciated.
Get Updates on the Splunk Community!

Get Inspired! We’ve Got Validation that Your Hard Work is Paying Off

We love our Splunk Community and want you to feel inspired by all your hard work! Eric Fusilero, our VP of ...

What's New in Splunk Enterprise 9.4: Features to Power Your Digital Resilience

Hey Splunky People! We are excited to share the latest updates in Splunk Enterprise 9.4. In this release we ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...