<?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 Restart saved search when it was running for longer time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352261#M104252</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have a saved search, which executes for every 5 minutes.&lt;/P&gt;

&lt;P&gt;Sometimes it fails because it was running for more time(found - Running 0% in view recent of action).&lt;/P&gt;

&lt;P&gt;If i delete that  particular job  and restart the saved search , its working fine.&lt;/P&gt;

&lt;P&gt;To make it work  consistency, Please suggest me a way to automatically delete long running job and restarting it.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Jun 2017 11:23:54 GMT</pubDate>
    <dc:creator>sujith_usha_kum</dc:creator>
    <dc:date>2017-06-13T11:23:54Z</dc:date>
    <item>
      <title>Restart saved search when it was running for longer time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352261#M104252</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I have a saved search, which executes for every 5 minutes.&lt;/P&gt;

&lt;P&gt;Sometimes it fails because it was running for more time(found - Running 0% in view recent of action).&lt;/P&gt;

&lt;P&gt;If i delete that  particular job  and restart the saved search , its working fine.&lt;/P&gt;

&lt;P&gt;To make it work  consistency, Please suggest me a way to automatically delete long running job and restarting it.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 11:23:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352261#M104252</guid>
      <dc:creator>sujith_usha_kum</dc:creator>
      <dc:date>2017-06-13T11:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Restart saved search when it was running for longer time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352262#M104253</link>
      <description>&lt;P&gt;What does the saved search do, summary indexing, reporting? If it runs more than 5 min, first consider optimization of the query and/or reducing the frequency, e.g. every 15 or 30 mins.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 16:05:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352262#M104253</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-06-13T16:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Restart saved search when it was running for longer time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352263#M104254</link>
      <description>&lt;P&gt;If you have a query that runs every 5 minutes and that sometimes takes more than 5 minutes to complete, then that query is a strong candidate for refactoring.&lt;/P&gt;

&lt;P&gt;Usually, when we hear this, we will find that the query is repeatedly chewing up the same data for a day, a week, a month, a quarter worth of data, and doing so every 5 minutes.  Most of that is wasted effort.&lt;/P&gt;

&lt;P&gt;If you tell us more about the underlying search, preferably posting the search code with any confidential information removed, then we can suggest whether it is a better candidate for a summary index, for search acceleration, for preprocessing into a csv file, or any of the other ways that such a search can be pre-aggregated to take literally 1/10 or less of the search time.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 16:10:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352263#M104254</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-06-13T16:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Restart saved search when it was running for longer time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352264#M104255</link>
      <description>&lt;P&gt;Show us the search.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 17:47:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352264#M104255</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-13T17:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Restart saved search when it was running for longer time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352265#M104256</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;Thanks for the  comments.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|inputlookup web_inventory.csv | where  url_type="static" AND Type_Application="Other" | eval content_id="static" | eval category_id="static" |eval title="static url" | eval _time=now()|table _time,category_id, content_id, title, url, id, name, description | aiamurlping  dedup | eval result_code=spath(payload, "resultCode")  | eval result_error_message=spath(payload, "errorDescription") | fields - payload
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;web_inventory.csv with "Other" is having 18 URL. The query has to get the response_time and status of the URL for every 5 min, which in turn will be index in a summary index. &lt;/P&gt;

&lt;P&gt;In Adhoc search the query executes in 3+ sec, whereas its running for long time in saved search.&lt;/P&gt;

&lt;P&gt;Please advise on this.&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:27:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352265#M104256</guid>
      <dc:creator>sujith_usha_kum</dc:creator>
      <dc:date>2020-09-29T14:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Restart saved search when it was running for longer time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352266#M104257</link>
      <description>&lt;P&gt;Okay, that does not match the usual issue.  &lt;/P&gt;

&lt;P&gt;In that code there are only three things that can take measurable time, the &lt;CODE&gt;| aiamurlping  dedup&lt;/CODE&gt; and the two &lt;CODE&gt;spath&lt;/CODE&gt;s.   The spaths are only going to take much time when the json is malformed, so that leaves the &lt;CODE&gt;aiamurlping&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;So, as a test, run this query &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup web_inventory.csv 
| where  url_type="static" AND Type_Application="Other"    
| stats count as dupcount by url
| where dupcount&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;... and if there are any results, then add this line after the line &lt;CODE&gt;| table _time, category_id ...&lt;/CODE&gt;, and before the rest of your query...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dedup url
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Other than that, you are probably being killed by the actual time it takes to run aiamurlping.  I can't find any information on that, although there are hints that it might be a python add-on, and by the name, it appears to be pinging a url for some kind of response.&lt;/P&gt;

&lt;P&gt;Given this situation myself, for testing, I would be breaking that web_inventory.csv down into small chunks (say 6 chunks of 3 urls) and running them independently for  a few hours to see which ones are causing the delays.  &lt;/P&gt;

&lt;P&gt;Alternatively, if you could establish that the search will ALWAYS end within x minutes, then you could clone your search and have &lt;CODE&gt;ceiling(x/5)&lt;/CODE&gt; identical versions that alternate, for example with every hour version 1 running at :00, :15, :30, :45; version 2 running at :05, :20, :35, :50; version 3 running at :10, :25, :40, :55)   &lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 15:26:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352266#M104257</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-06-14T15:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Restart saved search when it was running for longer time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352267#M104258</link>
      <description>&lt;P&gt;I wonder if there might be a coding or permissions issue with aiamurlping that is not showing up when run adhoc.  Do you have the actual code to that command?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 15:35:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352267#M104258</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-06-14T15:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Restart saved search when it was running for longer time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352268#M104259</link>
      <description>&lt;P&gt;Why in the world would you run this every 5 minutes?  Does &lt;CODE&gt;web_inventory.csv&lt;/CODE&gt; change more frequently than every 5 minutes?  This makes no sense.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 17:25:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352268#M104259</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-14T17:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: Restart saved search when it was running for longer time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352269#M104260</link>
      <description>&lt;P&gt;Yep, wish I had more details on that &lt;CODE&gt;aiamurlping&lt;/CODE&gt;... seems like he's trying to check the server response times, but I'm not sure why you'd want to have splunk itself doing that, rather than an external script.  It seems like using a utility knife as a screwdriver.  &lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2017 02:31:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352269#M104260</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-06-15T02:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Restart saved search when it was running for longer time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352270#M104261</link>
      <description>&lt;P&gt;&lt;CODE&gt;| aiamurlping dedup&lt;/CODE&gt; - may i know what this command does.. seems like a customer command (this aiamurlping not available on search reference and google search also returns this page only)&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2017 03:32:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Restart-saved-search-when-it-was-running-for-longer-time/m-p/352270#M104261</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-06-15T03:32:40Z</dc:date>
    </item>
  </channel>
</rss>

