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 (1)
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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...