Splunk Search

Splunk Time variable makes irritating search result with standard time Picker

GoodApprentice
New Member

Hallo,

i am trying to make a Dashboard that takes the time from reports of jobs.
That time is not the same as the time in Splunk. So the problem is that the time picker like 
"last 7 days" shows more than 7 days and the First and Last are not complete.
That is a Problem that i cant fix in the search code itself, i think.

Code: | eval NewTime=strptime(StartDateTZ,"%Y-%m-%d %H:%M:%S") | eval _time=NewTime | timechart span=1d@d count by TestName limit=0

Labels (3)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

Can you elaborate - when you talk about jobs, do you mean

  • you are using loadjob to show the results of a saved search?
  • The data that is indexed in Splunk has a timestamp in an event that is NOT the timestamp Splunk has for the event?

If the former, then the time picker should not be relevant. If the latter, then that is likely a problem with your data ingestion.

The _time variable is a fixed field that is created when the data is ingested and is key to how you find data and is inextricably linked to the search window you specify with any time picker.

If the _time field is not the same as your StartDate value and if you are saying it SHOULD be the  same, then you will need to fix how that data is ingested and how the time is extracted during ingestion from that data.

You cannot expect to find StartDate values that fall outside the time window of your search range if that time does not equal the _time field. Splunk will not pull the data from its time based buckets unless you get that _time field right.

 

 

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOK it to Me: Top 3 Benefits of Using Splunk Operator on Kubernetes that’ll Make ...

    Thursday, July 9, 2026  |  11:00AM–12:00PM PDT Duration: 1 hour (includes Q&A) Managing can feel like a ...

Upgrade Prep for 10.4, Network Observability Deep Dives, and More from Splunk Lantern

Splunk Lantern is Splunk’s customer success center that provides practical guidance from Splunk experts on key ...

Splunk Developer Day announcements: AI agents, MCP tools, Forecasting, and Custom ...

Splunk Developer Day was packed with product and platform updates for developers building in the AI ...