Splunk Search

How to make a loop in one event?

sabinayang
Observer

My log is like this:

TimeEvent
3/23/22 11:00:00.000 AM

Application 'AAA' is running

Application 'BBB' is stopped

Database 'CCC' is running

Database 'DDD' is running

3/23/22 11:10:00.000 AM

Application 'AAA' is running

Application 'BBB' is running

Database 'CCC' is stopped

Database 'DDD' is running

 

I want to extract a table like

TimeServerHostStatus
3/23/22 11:00:00.000 AMApplicationAAArunning
3/23/22 11:00:00.000 AMApplicationBBBstopped
3/23/22 11:00:00.000 AMDatabaseCCCrunning
3/23/22 11:00:00.000 AMDatabaseDDDrunning
3/23/22 11:10:00.000 AMApplicationAAArunning
3/23/22 11:10:00.000 AMApplicationBBBrunning
3/23/22 11:10:00.000 AMDatabaseCCCstopped
3/23/22 11:10:00.000 AMDatabaseDDDrunning

 

How to do this? If anyone has idea?

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Is event a multivalue field - if so, use mvexpand to expand to multiple events, then you can extract server, host and status from the event field

0 Karma
Get Updates on the Splunk Community!

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to ...

Announcing the Migration of the Splunk Add-on for Microsoft Azure Inputs to Officially Supported Splunk ...

Splunk Observability for AI

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