<?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: Dispatch directory is full. How do we clear it up? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283210#M190609</link>
    <description>&lt;P&gt;Very very kind of you!!! it worked.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Apr 2016 20:26:06 GMT</pubDate>
    <dc:creator>ddrillic</dc:creator>
    <dc:date>2016-04-04T20:26:06Z</dc:date>
    <item>
      <title>Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283206#M190605</link>
      <description>&lt;P&gt;We get an error message in the UI, saying that the dispatch directory is full. How can we clean it? We have two SHs...&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 19:07:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283206#M190605</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-04-04T19:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283207#M190606</link>
      <description>&lt;P&gt;See solutions here&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/29551/too-many-search-jobs-found-in-the-dispatch-directory.html"&gt;https://answers.splunk.com/answers/29551/too-many-search-jobs-found-in-the-dispatch-directory.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/139924/where-can-i-find-documentation-for-splunkd-clean-dispatch-command.html"&gt;https://answers.splunk.com/answers/139924/where-can-i-find-documentation-for-splunkd-clean-dispatch-command.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www.learnsplunk.com/splunk-kown-issues.html"&gt;http://www.learnsplunk.com/splunk-kown-issues.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 19:16:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283207#M190606</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-04-04T19:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283208#M190607</link>
      <description>&lt;P&gt;Great. Can we "just" clear the files instead of moving them?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 19:23:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283208#M190607</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-04-04T19:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283209#M190608</link>
      <description>&lt;P&gt;The native splunk method only provides moving but you can create your own custom script (and can schedule it to run frequently) to remove dispatch items manually. For example, the following command will remove dispatch artifacts older than 2 hours (I run this script every 5 min). You can adjust it according to your situation.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;dispatch=/var/opt/splunk/var/run/splunk/dispatch
splunkdir=/var/opt/splunk
find $dispatch -maxdepth 1 -mmin +120 2&amp;gt;/dev/null | while read job; do if [ ! -e "$job/save" ] ; then rm -rfv $job ; fi ; done
find $dispatch -type d -empty -name alive.token -mmin +120 2&amp;gt;/dev/null | xargs -i rm -Rf {}
find $splunkdir/var/run/splunk/ -type f -name "session-*" -mmin +120 2&amp;gt;/dev/null | xargs -i rm -Rf {}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Apr 2016 20:09:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283209#M190608</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-04-04T20:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283210#M190609</link>
      <description>&lt;P&gt;Very very kind of you!!! it worked.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2016 20:26:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283210#M190609</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2016-04-04T20:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283211#M190610</link>
      <description>&lt;P&gt;Hi somesoni2 ,&lt;BR /&gt;
thank you for sharing this script, as I'm faced to a similar problem, i would like to know how did you implement this script,&lt;/P&gt;

&lt;P&gt;Is a bash script? and where did you add this file ?&lt;/P&gt;

&lt;P&gt;Thanks in advance,&lt;/P&gt;

&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 15:41:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283211#M190610</guid>
      <dc:creator>mmekroud</dc:creator>
      <dc:date>2016-09-21T15:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283212#M190611</link>
      <description>&lt;P&gt;This is a bash script (I named is clean_dispatch.sh). I added this script to location $Splunk_Home/bin/scripts and created a scripted input to run this every 5 mins. The reason for using scripted input was to ensure it runs on every search head, every time, as I was using SHC.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:06:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283212#M190611</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T11:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283213#M190612</link>
      <description>&lt;P&gt;thank you for your fast reply,&lt;BR /&gt;
i got the idea for the clean_dispatch.sh, but not for the scripted input for 5 m (i'm not so advanced in shell) so could you please show me how did you made that =?&lt;/P&gt;

&lt;P&gt;i appreciate your help,&lt;/P&gt;

&lt;P&gt;thank you,&lt;/P&gt;

&lt;P&gt;regards,&lt;BR /&gt;
Mo&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 15:49:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283213#M190612</guid>
      <dc:creator>mmekroud</dc:creator>
      <dc:date>2016-09-21T15:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283214#M190613</link>
      <description>&lt;P&gt;The Scripted input is Splunk feature, which is generally used to get data for custom sources. It basically can run a script at regular interval, so I'm utilizing it to run my script at frequent interval. This way I can control it's deployment better (than the OS level cron jobs).&lt;/P&gt;

&lt;P&gt;See these for more details on Scripted input&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.4.3/AdvancedDev/ScriptedInputsIntro"&gt;https://docs.splunk.com/Documentation/Splunk/6.4.3/AdvancedDev/ScriptedInputsIntro&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.4.3/AdvancedDev/ScriptSetup"&gt;https://docs.splunk.com/Documentation/Splunk/6.4.3/AdvancedDev/ScriptSetup&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 15:58:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283214#M190613</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-09-21T15:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283215#M190614</link>
      <description>&lt;P&gt;Alright then, I'll check that closer,&lt;/P&gt;

&lt;P&gt;thank you for the details,&lt;/P&gt;

&lt;P&gt;regards,&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 16:05:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283215#M190614</guid>
      <dc:creator>mmekroud</dc:creator>
      <dc:date>2016-09-21T16:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283216#M190615</link>
      <description>&lt;P&gt;@somesoni2 : This script is really helpful. Thanks for that . Inspite of removing dispatch search older than 45 mins still count is really high (13000+) and It impacting the CPU usage.  we are running some saved searched on real-time not sure if that creates multiple dispatch. One way is to increase hardware but Is there anything else we can look at ? &lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 10:42:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283216#M190615</guid>
      <dc:creator>AKG1_old1</dc:creator>
      <dc:date>2019-08-28T10:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283217#M190616</link>
      <description>&lt;P&gt;Realtime searches increase the CPU utilization a lot as they hold on to one core forever. A real-time scheduled search doesn't stop, so it'll hold on to those system resources. I would suggest if possible, convert them to historical saved search and run them at a proper frequency. See this post for more explanation&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/100823/how-to-set-up-real-time-search-as-saved-search.html"&gt;https://answers.splunk.com/answers/100823/how-to-set-up-real-time-search-as-saved-search.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/Search/Aboutrealtimesearches"&gt;https://docs.splunk.com/Documentation/Splunk/7.3.1/Search/Aboutrealtimesearches&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 16:03:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283217#M190616</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-08-28T16:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283218#M190617</link>
      <description>&lt;P&gt;@somesoni :  Thank you for response. we  have converted some real-time searches to scheduled searches. but real issue is we are running many scheduled search in parallel. We enhance your script  to run every minute and removing older than 1 minutes of dispatch dir.  Now getting better cpu performance. Not sure if its advisible or not but not seeing any negative impact.  &lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 16:22:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283218#M190617</guid>
      <dc:creator>AKG1_old1</dc:creator>
      <dc:date>2019-08-28T16:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283219#M190618</link>
      <description>&lt;P&gt;You probably need to scale up your search heads, so that your concurrency limits can be increased. You'll see problem if someone tries to see the result of a saved search  (using loadjob or from job manager) as the artifacts are deleted, those search results won't be there. Again, it depends if someone uses it that way.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 16:27:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283219#M190618</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-08-28T16:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283220#M190619</link>
      <description>&lt;P&gt;@somesoni2 : Agreed !! we are planning to increase hardware. I thought so it will impact load job but we don't use loadjob anywhere so this is working for us. Thank you so much for clarification and help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 16:35:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/283220#M190619</guid>
      <dc:creator>AKG1_old1</dc:creator>
      <dc:date>2019-08-28T16:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch directory is full. How do we clear it up?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/629532#M218694</link>
      <description>&lt;P&gt;We need to clean the dispatch directory in a SH clustered environment.&lt;BR /&gt;&lt;BR /&gt;We didnt found any best practices for the clean-dispatch command and the Splunk documentation doesnt help either.&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.3/Search/Dispatchdirectoryandsearchartifacts" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.3/Search/Dispatchdirectoryandsearchartifacts&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Should we run the clean-dispatch command node per node? Stop node, clean-dispatch, start node?&lt;BR /&gt;Or should we stop the whole SH cluster, then clean-dispatch each node, and then start the nodes?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 16:24:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dispatch-directory-is-full-How-do-we-clear-it-up/m-p/629532#M218694</guid>
      <dc:creator>joshiro</dc:creator>
      <dc:date>2023-02-03T16:24:40Z</dc:date>
    </item>
  </channel>
</rss>

