<?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: What is the most efficient way to aggregate events by day over two separate streams? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617287#M214525</link>
    <description>&lt;P&gt;for sure!&amp;nbsp; this is really great information and i appreciate it!&lt;/P&gt;</description>
    <pubDate>Sun, 16 Oct 2022 23:20:34 GMT</pubDate>
    <dc:creator>loganseth</dc:creator>
    <dc:date>2022-10-16T23:20:34Z</dc:date>
    <item>
      <title>What is the most efficient way to aggregate events by day over two separate streams?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617051#M214441</link>
      <description>&lt;P&gt;I have two streams of data coming into a HEC.&amp;nbsp; one has call direction (i.e. inbound) and the other has call disposition (i.e. allowed).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;at first i was joining these streams (join), but found a great thread in the community suggesting using stats and so with some cleanup, i have something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index="my_hec_data" resource="somedata*" 
| stats values(*) as * by id&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;which works great, and may not even be related to my actual question, but next I want to count by day, cool, so just timechart it, but i suppose my real question is&lt;BR /&gt;&lt;BR /&gt;Is that the most efficient way to count calls by day?&amp;nbsp; or should i do some higher level aggregation somehow?&lt;BR /&gt;&lt;BR /&gt;i don't even know if that makes sense, but if there are 2M calls a day and I go back 30d, is "counting 60M rows" the best way to display 'events per day?'&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 20:45:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617051#M214441</guid>
      <dc:creator>loganseth</dc:creator>
      <dc:date>2022-10-13T20:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to aggregate events by day over two separate streams?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617084#M214451</link>
      <description>&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;| bucket span=1d&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;| stats count by _time, id&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 04:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617084#M214451</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2022-10-14T04:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to aggregate events by day over two separate streams?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617085#M214452</link>
      <description>&lt;P&gt;Oops typing on phone wasn’t helpful&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| bucket span=1d _time&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;| stats count by _time, id&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 04:35:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617085#M214452</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2022-10-14T04:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to aggregate events by day over two separate streams?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617208#M214485</link>
      <description>&lt;P&gt;ty!&amp;nbsp; in reading the bucket (&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.1/SearchReference/Bin" target="_self"&gt;bin&lt;/A&gt;) doc, it appears to be something chart/timechart, use, so do you feel this is 'faster' than just using something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| timechart usenull=f span=1h count by id&lt;/LI-CODE&gt;&lt;P&gt;my preliminary test is they are very close in run time (the bin one is a little faster), but trying to learn!&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you, again!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2022 20:48:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617208#M214485</guid>
      <dc:creator>loganseth</dc:creator>
      <dc:date>2022-10-14T20:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to aggregate events by day over two separate streams?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617223#M214495</link>
      <description>&lt;P&gt;Isn’t about speed exactly. Timechart is about charting. So by defaults limits values.&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.1/SearchReference/Timechart" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.1/SearchReference/Timechart&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;you can force change the limit. But stats doesn’t have that behavior.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;your question asked only about counting. Stats will count and not introduce unexpected behaviors for a different purpose.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Oct 2022 00:33:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617223#M214495</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2022-10-15T00:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to aggregate events by day over two separate streams?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617287#M214525</link>
      <description>&lt;P&gt;for sure!&amp;nbsp; this is really great information and i appreciate it!&lt;/P&gt;</description>
      <pubDate>Sun, 16 Oct 2022 23:20:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617287#M214525</guid>
      <dc:creator>loganseth</dc:creator>
      <dc:date>2022-10-16T23:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to aggregate events by day over two separate streams?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617291#M214528</link>
      <description>&lt;P&gt;To answer the question about 'most efficient', then unless you use something like summary searches or accelerated data models, then timechart/stats+bin are the most efficient ways.&lt;/P&gt;&lt;P&gt;However, if you find you want to be able to look back over 30 days regularly, then the sensible way to do this is to have a search that runs daily, e.g. a little after midnight, that does the counting and saves the results, either to a summary index or to a lookup.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Writing to a summary index is simple and the data can go back as long as you want to hold the data for. Using a lookup needs a little 'management' if you want to limit what data you retain.&lt;/P&gt;&lt;P&gt;In both cases though you can then simply search the summary index or lookup for your data (and then add in today's data to get current day figures)&lt;/P&gt;&lt;P&gt;If you do use summary indexing, then make your summaries as frequently as you need for any granularity you need for any drilldown purposes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 00:05:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617291#M214528</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-10-17T00:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to aggregate events by day over two separate streams?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617293#M214530</link>
      <description>&lt;P&gt;love this!&amp;nbsp; I've written reports that write to a lookup, but what is this 'write to an index' magic?&amp;nbsp; how do i do that, sir? &lt;span class="lia-unicode-emoji" title=":eyes:"&gt;👀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 01:18:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617293#M214530</guid>
      <dc:creator>loganseth</dc:creator>
      <dc:date>2022-10-17T01:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to aggregate events by day over two separate streams?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617295#M214532</link>
      <description>&lt;P&gt;Automatic summary indexing can be enabled on a scheduled saved search, just by selecting the Edit Summary Indexing option in the edit dropdown.&lt;/P&gt;&lt;P&gt;However, you can also do this manually, with the collect statement&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.1/SearchReference/Collect" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.1/SearchReference/Collect&lt;/A&gt;&lt;/P&gt;&lt;P&gt;where you just do&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;search to collect your info you want to save
| collect index=my_summary_index&lt;/LI-CODE&gt;&lt;P&gt;and this will collect the data you have at the point in the SPL pipeline to that summary index.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note: Do not believe all you read in that doc page about _time handling!&lt;/P&gt;&lt;P&gt;_time is dependent on several things. If you have only a _raw field then _time will be taken from the standard parsing of _raw.&lt;/P&gt;&lt;P&gt;If you don't have _raw, then if you have a _time field, it is ignored completely. If you run the search as a scheduled saved search, it will be the time the search runs, but if you run the search manually, it will be different.&lt;/P&gt;&lt;P&gt;So, experiment with _time, but be aware that it is not consistent and not as the doc states.&lt;/P&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>Mon, 17 Oct 2022 02:38:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617295#M214532</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-10-17T02:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to aggregate events by day over two separate streams?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617407#M214565</link>
      <description>&lt;P&gt;Awesome!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ended up trying Log Events and created my raw message using&lt;/P&gt;&lt;P&gt;_time="$result._time$";calls="$result.calls$";etc&lt;BR /&gt;&lt;BR /&gt;and it wrote to the index.&lt;/P&gt;&lt;P&gt;so, ya, this is great.&amp;nbsp; can create a set of X reports that run nightly to add data to this index.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;ETL the Splunk way.&lt;/P&gt;&lt;P&gt;appreciate the time and education!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 18:14:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-aggregate-events-by-day-over/m-p/617407#M214565</guid>
      <dc:creator>loganseth</dc:creator>
      <dc:date>2022-10-17T18:14:58Z</dc:date>
    </item>
  </channel>
</rss>

