All Apps and Add-ons

How long to wait after "splunk add oneshot" before doing searches?

paragcisco
Explorer

[All this is using CLI]

I do add oneshot for 3 log files one after the other.
Then I do an immediate search on the last log file which fails.

If I wait for a few seconds, the search works. My question is, is there a way for me to deterministically wait before beginning searches? I want to avoid adding sleeps as they may not work depending on how large the log file is.

Thanks!

Tags (1)

bwooden
Splunk Employee
Splunk Employee

One way would be to query the tailing processor (https://localhost:8089/services/admin/inputstatus/TailingProcessor:FileStatus). Here is more detail that links to a python script that shows how to do this: http://blogs.splunk.com/2011/01/02/did-i-miss-christmas-2/

Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...