Splunk Search

What is the search range given for beginning and end query?

thomasreggi
New Member

Given the following log lines:

Alpha
Beta
Gamma
Hello
World
Soup

I would like to query ` | first="Beta" | last="World" and get the following:

Beta
Gamma
Hello
World
0 Karma

niketn
Legend

@thomasreggi, Ideally you would need some correlation id to stitch events together i.e.

 <YourBaseSearch>
| transaction <some_id_or_ids> startswith="Beta" endswith="World"

There are several event correlation methods in Splunk like stats, transaction, lookup, append, appendcols, join, multisearch, union etc.. Based on use cases one or more can be applied: http://docs.splunk.com/Documentation/Splunk/latest/Search/Abouteventcorrelation

For your use case, transaction seems better fit. However, like stated earlier you would need some correlation id. Following is a run anywhere search where I have created id="myid1" as the id for transaction. PS: Query till reverse generate dummy data. The reverseis required only in the example not for real-time data.

| makeresults
| eval data="Alpha,Beta,Gamma,Hello,World,Soup"
| makemv data delim="," 
| mvexpand data
| rename data as _raw 
| reverse
| eval id="myid1"
| transaction id startswith="Beta" endswith="World"
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...

Network to App: Observability Unlocked [May & June Series]

In today’s digital landscape, your environment is no longer confined to the data center. It spans complex ...

SPL2 Deep Dives, AppDynamics Integrations, SAML Made Simple and Much More on Splunk ...

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...