Splunk Search

How to create a table to show all the values from the below log lines?

olilloyd
Engager

Log Lines are as given below

Reports
obtained. MyId=NameOne, sId=s0, Reports=true, LogString= url=status.com, Type=base, Available=true, Tag=112434, Token=2356 url=status2.com, Type=error, Available=false, Tag=12345, Token=23567

Reports obtained. MyId=NameTwo, sId=s1, Reports=true, LogString= url=status3.com, Type=base, Available=true, Tag=12345876, Token=2356 

I want to create a table as below

MyId  sId Reports url Type Available Tag Token
NameOne  s0 true status.com base true 112434 2356
NameOne  s0 true status2.com error false 12345 23567
NameTwo  s1 true status3.com base true 12345876 2356

 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| rex "MyId=(?<MyId>[^,]+).*sId=(?<sId>[^,]+).*Reports=(?<Reports>[^,]+)"
| rex max_match=0 "(?<set>url.*?Type.*?Available.*?Tag.*?Token\S+)"
| mvexpand set
| rex field=set "url=(?<url>[^,]+).*?Type=(?<Type>[^,]+).*?Available=(?<Available>[^,]+).*?Tag=(?<Tag>[^,]+).*?Token=(?<Token>\S+)"
| table MyId sId Reports url Type Available Tag Token

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| rex "MyId=(?<MyId>[^,]+).*sId=(?<sId>[^,]+).*Reports=(?<Reports>[^,]+)"
| rex max_match=0 "(?<set>url.*?Type.*?Available.*?Tag.*?Token\S+)"
| mvexpand set
| rex field=set "url=(?<url>[^,]+).*?Type=(?<Type>[^,]+).*?Available=(?<Available>[^,]+).*?Tag=(?<Tag>[^,]+).*?Token=(?<Token>\S+)"
| table MyId sId Reports url Type Available Tag Token
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

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

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...