<?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: &amp;quot;Collect&amp;quot; command doesnt work with &amp;quot;All time (Real-Time)&amp;quot; in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418588#M3680</link>
    <description>&lt;P&gt;ok, are you able to run other real time searches?!?!&lt;/P&gt;

&lt;P&gt;[capability::rtsearch]&lt;BR /&gt;
* Lets a user run realtime searches.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Aug 2018 13:18:27 GMT</pubDate>
    <dc:creator>inventsekar</dc:creator>
    <dc:date>2018-08-22T13:18:27Z</dc:date>
    <item>
      <title>"Collect" command doesnt work with "All time (Real-Time)"</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418583#M3675</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have a use case where I need to check for incomming events with measurements, combine and modify them and save as a new event. This is different from a simple summary as I might need to apply math to its values. What Im trying to use now is "Collect" command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main (host="host1" AND MeasurementChannel=1) OR (host="host2" AND MeasurementChannel=2) | stats latest(MeanValue) as sumMean latest(Timestamp) as latestTImestamps latest(_time) as _time by MeasurementChannel| stats sum(sumMean) as MeanValue latest(latestTImestamps) as Timestamp latest(_time) as _time | eval Alias="myCustomChannel" | collect index=main host=host1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This search works fine when executed as non-real time, but when I set time interval to "All Time(Real-time)" nothings gets collected. in documentation for Collect command (&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.2/SearchReference/Collect"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.2/SearchReference/Collect&lt;/A&gt;) it says &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;The collect command also works with real-time searches that have a time range of All time.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 22 Aug 2018 10:13:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418583#M3675</guid>
      <dc:creator>DavidGirsvaldas</dc:creator>
      <dc:date>2018-08-22T10:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: "Collect" command doesnt work with "All time (Real-Time)"</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418584#M3676</link>
      <description>&lt;P&gt;collect command Description....&lt;BR /&gt;
Adds the results of a search to a summary index that you specify. You must create the summary index before you invoke the collect command.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=main ....................| collect index=main host=host1&lt;/CODE&gt;&lt;BR /&gt;
here you are collecting the events from main index and sending it again to main index.&lt;/P&gt;

&lt;P&gt;probably you should re-write your query to... (beforehand, you have to create this mainCollectSummary index )&lt;BR /&gt;
&lt;CODE&gt;index=main ....................| collect index=mainCollectSummary&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 11:09:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418584#M3676</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2018-08-22T11:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: "Collect" command doesnt work with "All time (Real-Time)"</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418585#M3677</link>
      <description>&lt;P&gt;thank you for reply.&lt;BR /&gt;
I also tried collecting events to "summary" index and it behaved in a same way. It worked with non-real time queries. Also my use case actually requires events to be saved in a same index.&lt;BR /&gt;
"You must create the summary index before you invoke the collect command."- the way I read it, is that Splunk says search will not create a new index automatically by running search and so index should be created prior.&lt;BR /&gt;
"Adds the results of a search to a summary index that you specify"- as far as I know Real-Time searches never finishes so therefore they do not produce results. So I wouldnt expect it to work, but the Collect command documentation clearly states that command works with All-time(real time) which confuses me&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 11:20:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418585#M3677</guid>
      <dc:creator>DavidGirsvaldas</dc:creator>
      <dc:date>2018-08-22T11:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: "Collect" command doesnt work with "All time (Real-Time)"</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418586#M3678</link>
      <description>&lt;P&gt;maybe, update the authorize.conf file that gives a way to grant/remove this collect command from a user... &lt;/P&gt;

&lt;P&gt;[capability::run_collect]&lt;BR /&gt;
* Lets a user run the collect command.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Authorizeconf"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Admin/Authorizeconf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 11:52:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418586#M3678</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2018-08-22T11:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: "Collect" command doesnt work with "All time (Real-Time)"</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418587#M3679</link>
      <description>&lt;P&gt;The documentation page points to Splunk version 7.1.2 meanwhile Im using a bit older 7.0.2. This capability doesnt appear as option in my version and gets ignored if set in config files. However I doubt this is an issue since Im able to successfully  use Collect command as long as it is not real time. &lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 13:04:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418587#M3679</guid>
      <dc:creator>DavidGirsvaldas</dc:creator>
      <dc:date>2018-08-22T13:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: "Collect" command doesnt work with "All time (Real-Time)"</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418588#M3680</link>
      <description>&lt;P&gt;ok, are you able to run other real time searches?!?!&lt;/P&gt;

&lt;P&gt;[capability::rtsearch]&lt;BR /&gt;
* Lets a user run realtime searches.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 13:18:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418588#M3680</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2018-08-22T13:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: "Collect" command doesnt work with "All time (Real-Time)"</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418589#M3681</link>
      <description>&lt;P&gt;yes, they all work as expected. Im currently running it all using Admin role. rtsearch is enabled.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 13:26:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/quot-Collect-quot-command-doesnt-work-with-quot-All-time-Real/m-p/418589#M3681</guid>
      <dc:creator>DavidGirsvaldas</dc:creator>
      <dc:date>2018-08-22T13:26:03Z</dc:date>
    </item>
  </channel>
</rss>

