<?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 Timechart with moving count in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timechart-with-moving-count/m-p/681094#M232762</link>
    <description>&lt;P&gt;I'm trying to (efficiently) create a chart that collects a count of events, showing the count as a value spanning the previous 24h, over time.&amp;nbsp; i.e. every bin shows the count for the previous 24h.&lt;/P&gt;&lt;P&gt;This is intended to show the evaluations an alert is making every x minutes where it triggers if the count is greater than some threshold value.&amp;nbsp; I'm adding that threshold to the chart as a static line so we should be able to see the points at which the alert could have triggered.&lt;/P&gt;&lt;P&gt;I have the following right now, but it's only showing one data point per day when I would prefer the normal 100 bins&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
| timechart span=1d count
| eval threshold=1000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that's not too poorly worded &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Mar 2024 20:44:52 GMT</pubDate>
    <dc:creator>jrs42</dc:creator>
    <dc:date>2024-03-18T20:44:52Z</dc:date>
    <item>
      <title>Timechart with moving count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-with-moving-count/m-p/681094#M232762</link>
      <description>&lt;P&gt;I'm trying to (efficiently) create a chart that collects a count of events, showing the count as a value spanning the previous 24h, over time.&amp;nbsp; i.e. every bin shows the count for the previous 24h.&lt;/P&gt;&lt;P&gt;This is intended to show the evaluations an alert is making every x minutes where it triggers if the count is greater than some threshold value.&amp;nbsp; I'm adding that threshold to the chart as a static line so we should be able to see the points at which the alert could have triggered.&lt;/P&gt;&lt;P&gt;I have the following right now, but it's only showing one data point per day when I would prefer the normal 100 bins&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
| timechart span=1d count
| eval threshold=1000&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that's not too poorly worded &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 20:44:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-with-moving-count/m-p/681094#M232762</guid>
      <dc:creator>jrs42</dc:creator>
      <dc:date>2024-03-18T20:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart with moving count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-with-moving-count/m-p/681100#M232766</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm not sure if I understood your question correctly, but maybe you could get this done with streamstats?&lt;/P&gt;&lt;P&gt;You could use it first to calculate that sliding count for previous 24h and then use timechart with values/max to show those into your chart.&lt;/P&gt;&lt;P&gt;See &lt;A href="https://docs.splunk.com/Documentation/Splunk/9.2.0/SearchReference/Streamstats" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.2.0/SearchReference/Streamstats&lt;/A&gt;&amp;nbsp;use it with&amp;nbsp;&amp;nbsp;time_window=1d&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
| streamstats time_window=1d count as dailyCount ....
| timechart max(dailyCount) as dailyCount max(threshold) as threshold ...&lt;/LI-CODE&gt;&lt;P&gt;Use span on timechart and any other aggregate values which you maybe need.&lt;/P&gt;&lt;P&gt;r. Ismo&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 21:24:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-with-moving-count/m-p/681100#M232766</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-03-18T21:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart with moving count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-with-moving-count/m-p/681104#M232768</link>
      <description>&lt;P&gt;Unfortunately, that's not it.&amp;nbsp; Let me try to clarify &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Right now, I get results with one value per day so if I pick "last 7 days" I only see 7 data points which is much too coarse.&amp;nbsp; I'd prefer to have the normal "100 bins" or points of data, with each one the count of events for the preceding 24h from when that data point/bin is in time.&amp;nbsp; The end result would be a much smoother chart, basically showing the count value my alert is checking.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's looking to me that as soon as I pick "last 7 days", I'm in the realm of days and I cannot plot with more granularity.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 21:55:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-with-moving-count/m-p/681104#M232768</guid>
      <dc:creator>jrs42</dc:creator>
      <dc:date>2024-03-18T21:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Timechart with moving count</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timechart-with-moving-count/m-p/681106#M232769</link>
      <description>&lt;P&gt;That's what &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/214410"&gt;@isoutamo&lt;/a&gt; is talking about. This is what streamstats does. With properly set window (either in terms of number of events or time) it can calculate stats over moving window.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 22:39:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timechart-with-moving-count/m-p/681106#M232769</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-03-18T22:39:46Z</dc:date>
    </item>
  </channel>
</rss>

