Getting Data In

Search in the earliest source

ryastrebov
Communicator

Hello!
I have sourtsetype that contains multiple source. Into sourcetype permanently add new source. I need to search in the earliest source. For extract most earliest source I use this search request:

sourcetype="MySourceType" source=* NOT [ | inputlookup usedfiles.csv|fields source]| stats dc(source) by source | sort 1 by source | fields - dc(source) | outputlookup append=true usedfiles.csv

This search successfully return of earliest source name. How I can make search into this source? This search request is not working:

sourcetype="MySourceType" source=* NOT [ | inputlookup usedfiles.csv|fields source]| stats dc(source) by source | sort 1 by source | fields - dc(source) | outputlookup append=true usedfiles.csv | search Field="value"
Tags (2)
0 Karma
1 Solution

jstockamp
Communicator

I would think you could just use the "earliest" function of stats - i.e.

sourcetype="mysourcetype" | stats earliest(source) as firstsource | search source=firstsource

View solution in original post

jstockamp
Communicator

I would think you could just use the "earliest" function of stats - i.e.

sourcetype="mysourcetype" | stats earliest(source) as firstsource | search source=firstsource

ryastrebov
Communicator

Thank you!
And as the search will proceed to the next source?

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...