<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Join time selector based on event of main search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Join-time-selector-based-on-event-of-main-search/m-p/60421#M14887</link>
    <description>&lt;P&gt;Hi  agody, I just ran the following search on a test instance and it worked fine index=*  | head 10 | rename _time as time  | map search="search index=* earliest=$time$" what version of Splunk are you running on&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jun 2013 20:37:28 GMT</pubDate>
    <dc:creator>chris</dc:creator>
    <dc:date>2013-06-12T20:37:28Z</dc:date>
    <item>
      <title>Join time selector based on event of main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-time-selector-based-on-event-of-main-search/m-p/60418#M14884</link>
      <description>&lt;P&gt;Is it possible to do a search with a join and the events from the join search be relative to the time of the events of the main search?&lt;/P&gt;

&lt;P&gt;Lets say sourceA returns web server access log. SourceB has a running lists of IP address and systems that were assigned the IP address.&lt;/P&gt;

&lt;P&gt;For example, web server log has IP address 192.168.1.2 at around 2 pm. I want to search sourceB from 1pm to 3pm. Both sources have the src_ip field.&lt;/P&gt;

&lt;P&gt;Example search:&lt;BR /&gt;
    sourceA | join src_ip [search sourceB]&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2013 20:49:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-time-selector-based-on-event-of-main-search/m-p/60418#M14884</guid>
      <dc:creator>agodoy</dc:creator>
      <dc:date>2013-06-11T20:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Join time selector based on event of main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-time-selector-based-on-event-of-main-search/m-p/60419#M14885</link>
      <description>&lt;P&gt;This is probably not what you want but you may be able to use the map command to get some results:&lt;/P&gt;

&lt;P&gt;index=_internal  | stats count by host | addinfo |eval info_min_time=info_min_time-3600 | eval info_max_time=info_max_time+3600 | map search="search index=_internal host=$host$ starttimeu=$info_min_time$ endtimeu=$info_max_time$ | fields _raw"&lt;/P&gt;

&lt;P&gt;stats is used to return a list of the hosts in the base search &lt;BR /&gt;
addinfo adds the search timess of the search&lt;BR /&gt;
the evals change the span to whatever you want (+1h and -1h of the original searchspan)&lt;BR /&gt;
the map command will loop through every result  (the list of hosts with the modified inf_min/max_time fields and do a search you want&lt;/P&gt;

&lt;P&gt;Someone else is going to have a better idea ...&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:04:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-time-selector-based-on-event-of-main-search/m-p/60419#M14885</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2020-09-28T14:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Join time selector based on event of main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-time-selector-based-on-event-of-main-search/m-p/60420#M14886</link>
      <description>&lt;P&gt;Hmm. I cant seem to get the map command to work.&lt;/P&gt;

&lt;P&gt;Trying a simple search:&lt;BR /&gt;
sourceA src_ip=X | rename _time as time | map search="index=y earliest=$time$"&lt;BR /&gt;
Getting: [EventsViewer module] Error in 'map': Did not find value for required attribute 'time'.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2013 21:45:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-time-selector-based-on-event-of-main-search/m-p/60420#M14886</guid>
      <dc:creator>agodoy</dc:creator>
      <dc:date>2013-06-11T21:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Join time selector based on event of main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-time-selector-based-on-event-of-main-search/m-p/60421#M14887</link>
      <description>&lt;P&gt;Hi  agody, I just ran the following search on a test instance and it worked fine index=*  | head 10 | rename _time as time  | map search="search index=* earliest=$time$" what version of Splunk are you running on&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2013 20:37:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-time-selector-based-on-event-of-main-search/m-p/60421#M14887</guid>
      <dc:creator>chris</dc:creator>
      <dc:date>2013-06-12T20:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Join time selector based on event of main search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Join-time-selector-based-on-event-of-main-search/m-p/60422#M14888</link>
      <description>&lt;P&gt;I am running 4.3. The same search worked the next day, but the results were not quite what I was expecting.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jun 2013 13:11:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Join-time-selector-based-on-event-of-main-search/m-p/60422#M14888</guid>
      <dc:creator>agodoy</dc:creator>
      <dc:date>2013-06-14T13:11:19Z</dc:date>
    </item>
  </channel>
</rss>

