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!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...