Splunk Search

Why is extracted field formatted incorrectly?

yk010123
Path Finder

I have the following log that Splunk is not recognizing well :

msg=id=123342521352 operation=write

 

How can I write a query so that ID is parsed by itself?

The goal is to be able to build a table like :

id operation
123342521352 write

 

Unfortunately, when I tried

table id operation

The id is always empty as it does not seem to be parsed correctly

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

yuanliu
SplunkTrust
SplunkTrust

If you look at events, you'll find the field msg with "id" as value.  In SPL, you can use rex to extract id as a field, e.g.,

| rex "msg=id=(?<id>\d+)"

View solution in original post

yuanliu
SplunkTrust
SplunkTrust

If you look at events, you'll find the field msg with "id" as value.  In SPL, you can use rex to extract id as a field, e.g.,

| rex "msg=id=(?<id>\d+)"
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...