Splunk Search

I am running an import script for an interval of 5 mins to collect data from all sourcetypes and put it into a summary index.

Gunjan92
Engager

I have a situation where in the span of 10 mins there could be a possibility that we didn't get any data from one of the sourcetype for one interval but started getting data for next interval, by this way I am loosing data in summary index. Any suggestion would be helpful.

Here's a part of my query:
| metadata type=sources index=abc
| search source=random
| eval earliest=lastTime - 300
| eval latest=now()
| fields earliest latest

So this random source is collecting data from all the sourcetypes.

Tags (1)

woodcock
Esteemed Legend

This is the reason that most searches of this type run at least 5 minutes back in time, preferably an hour or more. There really is no way around it. You can examine your latency with a search like this:

|tstats max(_indextime) AS indextime WHERE index=_* OR index=* BY index sourcetype _time
| stats avg(eval(indextime - _time)) AS latency BY index sourcetype
| fieldformat latency = tostring(latency, "duration")
| sort 0 - latency
0 Karma

anmolpatel
Builder

Don't really understand the question. Can you please elaborate or provide an example?

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...