Splunk Search

Is there a way to run a joined query with different date parameters. (Not Using Historical Data)

jwhit
Engager

I am trying to run a query that takes the average runtime of log files and compares them to the current run time of log files. They have different dates because the average should only take the completed jobs up to but not including the current day, and the current job should use the timeframe of 24 hours past the current time. Is there anyway I can run both in the same query using a join.

Tags (3)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

You can use different time ranges in subsearches by explicitly specifying earliest= and latest= in the subsearch.

martin_mueller
SplunkTrust
SplunkTrust

Run this over all time and compare the two rows and the info_min_time / info_max_time fields:

| stats count | addinfo | append [search earliest=-5m latest=now | stats count | addinfo]
0 Karma

jwhit
Engager

What should I be looking for in the comparison?

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

One should contain 0 for min, the other should contain whatever epoch time it was five minutes ago.

0 Karma

jwhit
Engager

I have done that but the All-Time preset seems to over ride those dates.

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!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...