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!

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...