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!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...