Knowledge Management

start and finish time to be set for summary index to get data for last 24 hours

nivethainspire_
Explorer

I am trying to create summary index from UI, cron scheduled everyday at 9.30AM (30 9 * * *)
My requirement is I should see the data in dashboard for last 24 hours. Right now I set
start time as @d and finish time as now - I get data from today 9.30 AM to nextday 12.00AM
start time as -d and finish time as now - I get data from day before data
what is start and finish time to be set for this summary index?

0 Karma

o_calmels
Communicator

Hi,

The answer depends on yout need:
To get data during the entire last day only, you can use earliest=@d latest=-1d@d (the @day flag specify that you want entire day)
To get, exactly last 24 h (including minutes), so, from last day 9:30 AM to now, you can use : earliest=-24h@min, latest=now(the @min flag specify that you want time range with minutes details).

You can test these expresions in search app > Click "time range " and select "Advanced time range option". when you set values in the boxes, the effective time is calculated (documentation : https://docs.splunk.com/Documentation/Splunk/latest/Search/Selecttimerangestoapply)
Hope that helps.

Olivier.

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 ...