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!

Alpha Launch: AI-Assisted Auto-Schematization for CIM

Streamlining Data Onboarding: Announcing the Alpha Release of AI-Assisted Auto-Schematization For many Splunk ...

Enterprise Security(ES) Essentials or Premier? Let's discuss Splunk ES Editions on ...

  Hi everyone, Last year at .conf25, we shared something exciting: Splunk Enterprise Security is evolving ...

[Puzzles] Solve, Learn, Repeat: Advent of Code - Day 5

Advent of CodeIn order to participate in these challenges, you will need to register with the Advent of Code ...