Reporting

What timezone does my scheduled search run in?

joxley
Path Finder

My Splunk server is sitting in UTC and my Browser in BST (UTC+1). I have created a search that does

search terms | bucket span=1d _time | stats terms by _time and clauses | collect index=summary marker="name=summary_data"

If I run the search in the browser for the last 30 days to seed the summary index:

  • What time in UTC will the search run?
  • What times in UTC will bucket work on?

If I then schedule the search to run at 3am for -1d@d to @d with the same search, including the bucket:

  • What time in UTC will the search run?
  • What time in UTC witll bucket work on?
  • Does the Run as owner/user option make any difference to the search?
0 Karma
1 Solution

masonmorales
Influencer

The search itself will always run in server time. The "scheduled time" and event timestamps will just be displayed using your selected time zone. Search commands (e.g. bucket) all work on server time as well, the presentation layer just changes it to display in your selected time zone.

Run as owner/user does not make any difference to the search time ranges.

One thing to note is that when you are doing ad hoc searches, the time picker assumes you are selecting a time range in your selected time zone,. This means that the actual time range of your search will be translated from your selected time zone to the server time zone.

View solution in original post

masonmorales
Influencer

The search itself will always run in server time. The "scheduled time" and event timestamps will just be displayed using your selected time zone. Search commands (e.g. bucket) all work on server time as well, the presentation layer just changes it to display in your selected time zone.

Run as owner/user does not make any difference to the search time ranges.

One thing to note is that when you are doing ad hoc searches, the time picker assumes you are selecting a time range in your selected time zone,. This means that the actual time range of your search will be translated from your selected time zone to the server time zone.

masonmorales
Influencer

BTW, I am assuming that when you say "Browser in BST (UTC+1)", that you have gone into your user preferences within Splunk and changed the time zone for your account to "BST (UTC+1)". The time zone configured on your OS isn't used by Splunk.

ridwanahmed
Path Finder

@masonmorales some clarification questions:
1. When you say search "will run in server time"-- of the Indexer or SH?
If I schedule a search to run at midnight my (SH) time, which is 5am Indexer time, looking back one hour-- I will get 4am-5am Indexer time results, right?
2. "This means that the actual time range of your search will be translated from your selected time zone to the server time zone. " So if I ask for data from the 12th hour/day/month, it will return the logs that are timestamped such on the Indexer (the actual log timestamps of 12/12 at 12oclock), right?
Thanks

0 Karma

burwell
SplunkTrust
SplunkTrust

So my experience is that the scheduled search runs in the timezone of the user. That is my experience as well.

I see another Splunk answers here where someone else said the same thing.

https://answers.splunk.com/answers/311857/cron-schedule-stuck-on-initial-user-timezone.html

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...