<?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 How to get latest time from an index's subsearch in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-time-from-an-index-s-subsearch/m-p/521554#M146984</link>
    <description>&lt;P&gt;When i run this query it seems to run just fine as an adhoc search but when i schedule it, it throws the following error&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;[subsearch]: [subsearch]: [SERVER1] Search process did not exit cleanly, exit_code=-1, description="exited with code -1". Please look in search.log for this peer in the Job Inspector for more info.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the query. The issue is definitely not space on the drive, there's plenty of space. Also, if I hard code subsearch&amp;nbsp;search index=idx2 earliest=-30d@d latest=now, the scheduled search will work fine but then i would have to add some additional lines of SPL to ensure we are using only the latest pull to avoid duplicate data which takes a little longer to run as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex sourcetype="mysource1" 
    [| metadata index=myindex type=sourcetypes 
    | search sourcetype="mysource1" 
    | eval earliest=relative_time(lastTime,"-1h@h") 
    | table earliest] 
| table id1 field1 field2 field3 
| join type=left field3 
    [ search index=idx2 
        [| metadata index=idx2 type=sourcetypes 
        | search sourcetype="source2" 
        | eval earliest=relative_time(lastTime,"-1h@h") 
        | table earliest] 
    | rename id as field3 
    | table field3,f4,f5,f6,f7]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Sep 2020 20:20:52 GMT</pubDate>
    <dc:creator>aa70627</dc:creator>
    <dc:date>2020-09-25T20:20:52Z</dc:date>
    <item>
      <title>How to get latest time from an index's subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-time-from-an-index-s-subsearch/m-p/521554#M146984</link>
      <description>&lt;P&gt;When i run this query it seems to run just fine as an adhoc search but when i schedule it, it throws the following error&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;[subsearch]: [subsearch]: [SERVER1] Search process did not exit cleanly, exit_code=-1, description="exited with code -1". Please look in search.log for this peer in the Job Inspector for more info.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the query. The issue is definitely not space on the drive, there's plenty of space. Also, if I hard code subsearch&amp;nbsp;search index=idx2 earliest=-30d@d latest=now, the scheduled search will work fine but then i would have to add some additional lines of SPL to ensure we are using only the latest pull to avoid duplicate data which takes a little longer to run as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex sourcetype="mysource1" 
    [| metadata index=myindex type=sourcetypes 
    | search sourcetype="mysource1" 
    | eval earliest=relative_time(lastTime,"-1h@h") 
    | table earliest] 
| table id1 field1 field2 field3 
| join type=left field3 
    [ search index=idx2 
        [| metadata index=idx2 type=sourcetypes 
        | search sourcetype="source2" 
        | eval earliest=relative_time(lastTime,"-1h@h") 
        | table earliest] 
    | rename id as field3 
    | table field3,f4,f5,f6,f7]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 20:20:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-time-from-an-index-s-subsearch/m-p/521554#M146984</guid>
      <dc:creator>aa70627</dc:creator>
      <dc:date>2020-09-25T20:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to get latest time from an index's subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-time-from-an-index-s-subsearch/m-p/521559#M146986</link>
      <description>&lt;P&gt;What information did you find in the search log?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 21:05:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-time-from-an-index-s-subsearch/m-p/521559#M146986</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-09-25T21:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to get latest time from an index's subsearch</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-time-from-an-index-s-subsearch/m-p/521570#M146991</link>
      <description>&lt;P&gt;Its extensively long. most of them were ignorable based on other splunk answers. This one seems to have caught my attention.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;info : Your timerange was substituted based on your search string&lt;BR /&gt;info : [subsearch]: Your timerange was substituted based on your search string&lt;BR /&gt;warn : The limit has been reached for log messages in info.csv. 52 messages have not been written to info.csv. Refer to search.log for these messages or limits.conf to configure this limit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i used the solution from this one and it resolved my issue. I'm not seeing the error anymore in the past 5 scheduled searches - "&lt;SPAN&gt;Search process did not exit cleanly, exit_code=-1, description="exited with code -1"."&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/After-updating-an-app-why-am-I-getting-search-error-quot-The/m-p/239462" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/After-updating-an-app-why-am-I-getting-search-error-quot-The/m-p/239462&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;solution&lt;/P&gt;&lt;P&gt;Add a limits&amp;nbsp; $Splunk_home$/etc/app/&lt;EM&gt;{your_app&lt;/EM&gt;}/local/limits.conf and add the stanza.&amp;nbsp;&lt;/P&gt;&lt;P&gt;[search_info]&lt;BR /&gt;max_infocsv_messages =1000&lt;/P&gt;</description>
      <pubDate>Fri, 25 Sep 2020 23:41:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-latest-time-from-an-index-s-subsearch/m-p/521570#M146991</guid>
      <dc:creator>aa70627</dc:creator>
      <dc:date>2020-09-25T23:41:36Z</dc:date>
    </item>
  </channel>
</rss>

