<?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: Average alarms per reader over time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Average-alarms-per-reader-over-time/m-p/556210#M157937</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;basically what it was doing was getting the average of all the days by 220 rather than average of each day. However the search string you just provided seems to be the perfect solution for this.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Jun 2021 16:38:27 GMT</pubDate>
    <dc:creator>msage</dc:creator>
    <dc:date>2021-06-17T16:38:27Z</dc:date>
    <item>
      <title>Average alarms per reader over time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-alarms-per-reader-over-time/m-p/555811#M157806</link>
      <description>&lt;P&gt;A bit ago I submitted a question regarding how to get the average alarms per reader. So for example we have 100 alarms and 100 readers. That's on average 1 alarm per reader. With the help of the forum I got my answer but now I need to figure out how to get a trend of this search. I tried using a timechart but based on the way the search is built, it completely skews the results. Here's the search itself&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="index" EVDESCR="EVDESCR"
| dedup EVENT_TIME
| bucket _time span=1d
| stats count by READERDESC
| stats sum(count) as sum_count
| eval result=sum_count / 220&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jun 2021 15:14:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-alarms-per-reader-over-time/m-p/555811#M157806</guid>
      <dc:creator>msage</dc:creator>
      <dc:date>2021-06-15T15:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Average alarms per reader over time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-alarms-per-reader-over-time/m-p/555899#M157849</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224528"&gt;@msage&lt;/a&gt;&amp;nbsp;You want to illustrate what timechart command you have tried and what is the difference between actual result and expected results so others can understand the intended use case. &amp;nbsp; The second stats &amp;nbsp;command in the search you illustrated negates the groupby in the first, and the time bucket &amp;nbsp;has &amp;nbsp;no effect. &amp;nbsp;The entire search can be collapsed as&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="index" EVDESCR="EVDESCR"
| dedup EVENT_TIME
| stats count as sum_count
| eval result=sum_count / 220&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I speculate your intentions based on the subject line and the illustrated search, you have &amp;nbsp;220 readers (not 100); you want a single average value, nothing grouped by READER_DESC. &amp;nbsp;This might be what you are asking for&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="index" EVDESCR="EVDESCR"
| dedup EVENT_TIME

| timechart span=1d count as average_alarms_per_reader
| eval average_alarms_per_reader = average_alarms_per_reader / 220&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Basically, count how many total alarms per day, and divide each count by &amp;nbsp;220.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jun 2021 04:14:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-alarms-per-reader-over-time/m-p/555899#M157849</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2021-06-16T04:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Average alarms per reader over time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Average-alarms-per-reader-over-time/m-p/556210#M157937</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;basically what it was doing was getting the average of all the days by 220 rather than average of each day. However the search string you just provided seems to be the perfect solution for this.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 16:38:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Average-alarms-per-reader-over-time/m-p/556210#M157937</guid>
      <dc:creator>msage</dc:creator>
      <dc:date>2021-06-17T16:38:27Z</dc:date>
    </item>
  </channel>
</rss>

