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!

Think Like an Architect: Introducing the Splunk Certified Cybersecurity Defense ...

In cybersecurity, defenders respond to threats. Architects design the systems that stop them.    As ...

Index This | What has goals but no motivation?

June 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Deep Dive: Accelerate threat investigation with Splunk’s AI Assistant in Security

AI is one of the biggest topics in the market today, and for security teams, its value goes far beyond the ...