<?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: Variable timespan causes data to be counted incorrectly in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Variable-timespan-causes-data-to-be-counted-incorrectly/m-p/543748#M37283</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/3763"&gt;@azeller&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want timechart to display the count per second irrespective of the bin width timechart calculates internally:&lt;/P&gt;&lt;P&gt;| bucket _time span=1m&lt;BR /&gt;| stats count by _time TYPE&lt;BR /&gt;| timechart per_second(count) by TYPE&lt;/P&gt;&lt;P&gt;The per_&lt;EM&gt;unit&lt;/EM&gt; functions will sum the field values over the timechart bin and then divide by the number of time units within that bin.&lt;/P&gt;&lt;P&gt;If you want to fix the bin width at one minute:&lt;/P&gt;&lt;P&gt;| bucket _time span=1m&lt;BR /&gt;| stats count by _time TYPE&lt;BR /&gt;| timechart span=1m per_second(count) by TYPE&lt;/P&gt;&lt;P&gt;However, you will run into chart display limits over large timespans. The chart can display no more x-values&amp;nbsp; than the width of the chart in pixels.&lt;/P&gt;&lt;P&gt;Note that timechart's bin option is merely a suggestion. Like the bin/bucket command, it will use&amp;nbsp;&lt;EM&gt;at most&lt;/EM&gt; the number of bins you specify but will likely use less.&lt;/P&gt;</description>
    <pubDate>Sun, 14 Mar 2021 19:20:16 GMT</pubDate>
    <dc:creator>tscroggins</dc:creator>
    <dc:date>2021-03-14T19:20:16Z</dc:date>
    <item>
      <title>Variable timespan causes data to be counted incorrectly</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Variable-timespan-causes-data-to-be-counted-incorrectly/m-p/543223#M37238</link>
      <description>&lt;P&gt;When we change the time span in a dashboard for this report, the counting of the values changes after 15 hours. The stats values go from a 1 minute span to a 5 minute span. I believe we need a way to use a "Variable" for the time and counting section in bold below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sourcetype=ib:ddns index=ib_dns | rex field=REST "'(?&amp;lt;ZONE&amp;gt;[^ ]+)/IN'" | eval TYPE=if(isnull(TYPEA), case(match(REST, "updating zone '[^ ]+/IN': adding an RR at") OR match(REST, "updating zone '[^ ]+/IN': delet"), "Success", match(REST, "update '[^ ]+/IN' denied"), "Reject", match(REST, "updating zone '[^ ]+/IN': update unsuccessful.*prerequisite not satisfied \([NY]XDOMAIN\)"), "PrerequisiteReject", match(REST, "updating zone '[^ ]+/IN': update failed"), "Failure"), TYPEA) | eval VIEW=if(isnull(VIEW),"_default",replace(VIEW,"view (\d+)","\1")) | lookup dns_viewkey_displayname_lookup VIEW output display_name &lt;STRONG&gt;&lt;U&gt;| bucket span=1m _time | stats count by _time TYPE | timechart bins=1000 eval(avg(count)/60) by TYPE &lt;/U&gt;&lt;/STRONG&gt;| interpolate 120 | eval Success=if(isnull(Success),0,Success) | eval Failure=if(isnull(Failure),0,Failure) | eval Reject=if(isnull(Reject),0,Reject) | eval PrerequisiteReject=if(isnull(PrerequisiteReject),0,PrerequisiteReject) | rename PrerequisiteReject as "Prerequisite Reject"&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 16:14:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Variable-timespan-causes-data-to-be-counted-incorrectly/m-p/543223#M37238</guid>
      <dc:creator>azeller</dc:creator>
      <dc:date>2021-03-10T16:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Variable timespan causes data to be counted incorrectly</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Variable-timespan-causes-data-to-be-counted-incorrectly/m-p/543748#M37283</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/3763"&gt;@azeller&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want timechart to display the count per second irrespective of the bin width timechart calculates internally:&lt;/P&gt;&lt;P&gt;| bucket _time span=1m&lt;BR /&gt;| stats count by _time TYPE&lt;BR /&gt;| timechart per_second(count) by TYPE&lt;/P&gt;&lt;P&gt;The per_&lt;EM&gt;unit&lt;/EM&gt; functions will sum the field values over the timechart bin and then divide by the number of time units within that bin.&lt;/P&gt;&lt;P&gt;If you want to fix the bin width at one minute:&lt;/P&gt;&lt;P&gt;| bucket _time span=1m&lt;BR /&gt;| stats count by _time TYPE&lt;BR /&gt;| timechart span=1m per_second(count) by TYPE&lt;/P&gt;&lt;P&gt;However, you will run into chart display limits over large timespans. The chart can display no more x-values&amp;nbsp; than the width of the chart in pixels.&lt;/P&gt;&lt;P&gt;Note that timechart's bin option is merely a suggestion. Like the bin/bucket command, it will use&amp;nbsp;&lt;EM&gt;at most&lt;/EM&gt; the number of bins you specify but will likely use less.&lt;/P&gt;</description>
      <pubDate>Sun, 14 Mar 2021 19:20:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Variable-timespan-causes-data-to-be-counted-incorrectly/m-p/543748#M37283</guid>
      <dc:creator>tscroggins</dc:creator>
      <dc:date>2021-03-14T19:20:16Z</dc:date>
    </item>
  </channel>
</rss>

