Splunk Search

Make subsearch to use different timerange than main search

zucler
Explorer

Hi guys,

I'm looking for a solution to make a time range for my subsearch to be different from the main search (which uses datepicker).

At the moment, if I'm using earlier/later statements, it would not work. It just returns

[subsearch]: Your timerange was substituted based on your search string

The query is
source="/var/log/splunk/viewsAFR.log" type=start | join playbackID [ SEARCH source="/var/log/splunk/playbackAFR.log" ] | join [ SEARCH source="/var/log/splunk/afr_channel_map.csv" earliest=0 latest=now ]

Please advise.

Thanks

Tags (2)
0 Karma
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

It's telling you that it is working.

View solution in original post

e82than
Communicator

if you're not in a production environment, try using the logger command. Do make sure you send it from the system intended so the event can be read correctly. It can be used to simulate syslog events. You can try and ask for permission to inject events to proof your search is right.

I had to do it sometimes to test connectivity between systems. Also when in dispute of searches not working.

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

It's telling you that it is working.

zucler
Explorer

Oh, indeed. Thanks for that. The search was returning me 0 results, so I thought it was not applying my date range, but that's another issue.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...