Splunk Search

Regex Expressions

anandhalagarasa
Path Finder

Hi Team,

I need to extract the fields from the JSON format in my Search Head GUI so kindly let us know how to proceed further.

{ [-]
id:

message: 2018-10-11 10:33:46,879 [44] |INFO|Access=abcdef|Max=(abcd)|Data=(xyz)|Fox=(ghi)|Mach=(pqrs)|Bend=(uvw)| http://amazon.com.local:098765/dam/healthchecks/band

 severity:   INFO   

}

Need to extract fields in the form of Regex:

Date:2018-10-11 10:33:46,879
Level=INFO
Access=abcdef
Max=(abcd)
Fox=(ghi)
Mach=(pqrs)
Bend=(uvw)
Message=http://amazon.com.local:098765/dam/healthchecks/band

Once the fields are extracted if we click Max on the left hand side it needs to show abcd

So kindly help on this to make up a regex so that i can able to implement the same and extract those fields.

Tags (1)
0 Karma

skoelpin
SplunkTrust
SplunkTrust

If its already in Splunk and you want to extract at search-time, you will then need to get crafty with spath

https://answers.splunk.com/answers/642304/how-can-i-extract-the-json-data-as-key-value-pair.html

0 Karma

kmorris_splunk
Splunk Employee
Splunk Employee

Could you re-paste your sample? It seems like you may have formatted part of it as code using the 101010 button.

0 Karma

anandhalagarasa
Path Finder

Kindly help on this request.

0 Karma

inventsekar
SplunkTrust
SplunkTrust

you want to extract the fields from the logs which are already ingested or you want to setup props/transforms, so that the future logs will be automatically extracted?!?!

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

anandhalagarasa
Path Finder

I want to extract the fields which is already getting ingested into Splunk and they are in JSON format. And I want to extract in GUI using Regex expressions.

0 Karma

anandhalagarasa
Path Finder

Kindly help

0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...