<?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 Splunk metrics and counters in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Splunk-metrics-and-counters/m-p/528568#M8568</link>
    <description>&lt;P&gt;&lt;SPAN&gt;What is the appropriate way to calculate a sum of metric rates on counters and sum them, either for a single stat or for a timechart?&amp;nbsp; What does the rate() of a metric mean?&amp;nbsp; rate/sample or rate/second?&amp;nbsp; &amp;nbsp;I am looking for guidance.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am extracting bind9 stats from our dozen DNS recursive servers every 5 minutes.&amp;nbsp; The stats are counters. I am extracting the stats every 10 minutes so that I can get 2 samples each for rate calculations.&lt;BR /&gt;&lt;BR /&gt;Base search:&lt;BR /&gt;| mstats rate(QrySuccess) as QrySuccess rate(QryFailure) as QryFailure rate(QrySERVFAIL) as QrySERVFAIL rate(QryFORMERR) as QryFORMERR&lt;BR /&gt;&amp;nbsp; &amp;nbsp; rate(QryNXDOMAIN) as QryNXDOMAIN rate(QryRecursion) as QryRecursion&lt;BR /&gt;&amp;nbsp; &amp;nbsp; prestats=false &amp;nbsp;WHERE index="test_network_metrics" AND host="*" span=10m by host&lt;BR /&gt;| fields *&lt;BR /&gt;&lt;BR /&gt;SingleStat Panel&lt;BR /&gt;| fields QrySuccess&lt;BR /&gt;| eval Success=QrySuccess/300&lt;BR /&gt;| stats sum(Success)&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="success_qps.png" style="width: 200px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11690i3663D725FF83D346/image-size/small?v=v2&amp;amp;px=200" role="button" title="success_qps.png" alt="success_qps.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;SPAN&gt;Timechart Panel&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| fields QrySuccess host&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| timechart span=10m latest(QrySuccess) as Success by host&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-11-02 at 6.24.55 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11691i4A7B1F018FC2E5BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-11-02 at 6.24.55 AM.png" alt="Screen Shot 2020-11-02 at 6.24.55 AM.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;The numbers don't exactly look right as at peak I am expecting traffic on the order of thousands per second.&amp;nbsp; I am thinking that I botched the stats.&amp;nbsp; System wide, I am running about 14M qph or about 3900 qps.&amp;nbsp; If I leave off the division by 300 convert 5min to 1sec, it looks closer to normal, or about 30% of what I am expecting.&amp;nbsp; Below is what I get from processing hourly summaries of DNS query transaction logs.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screen Shot 2020-11-02 at 6.06.41 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11693iDC5A635355C8A630/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-11-02 at 6.06.41 AM.png" alt="Screen Shot 2020-11-02 at 6.06.41 AM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;I experimented with summing the latest on the target field, but the numbers come out about the same.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;| fields QrySuccess host&lt;BR /&gt;| fillnull value=0.0 QrySuccess&lt;BR /&gt;| stats latest(QrySuccess) as Success by host&lt;BR /&gt;| addcoltotals labelfield=host fieldname=Success&lt;BR /&gt;| tail 1&lt;BR /&gt;| fields Success&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 09 Nov 2020 17:28:14 GMT</pubDate>
    <dc:creator>peiffer</dc:creator>
    <dc:date>2020-11-09T17:28:14Z</dc:date>
    <item>
      <title>Splunk metrics and counters</title>
      <link>https://community.splunk.com/t5/Reporting/Splunk-metrics-and-counters/m-p/528568#M8568</link>
      <description>&lt;P&gt;&lt;SPAN&gt;What is the appropriate way to calculate a sum of metric rates on counters and sum them, either for a single stat or for a timechart?&amp;nbsp; What does the rate() of a metric mean?&amp;nbsp; rate/sample or rate/second?&amp;nbsp; &amp;nbsp;I am looking for guidance.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am extracting bind9 stats from our dozen DNS recursive servers every 5 minutes.&amp;nbsp; The stats are counters. I am extracting the stats every 10 minutes so that I can get 2 samples each for rate calculations.&lt;BR /&gt;&lt;BR /&gt;Base search:&lt;BR /&gt;| mstats rate(QrySuccess) as QrySuccess rate(QryFailure) as QryFailure rate(QrySERVFAIL) as QrySERVFAIL rate(QryFORMERR) as QryFORMERR&lt;BR /&gt;&amp;nbsp; &amp;nbsp; rate(QryNXDOMAIN) as QryNXDOMAIN rate(QryRecursion) as QryRecursion&lt;BR /&gt;&amp;nbsp; &amp;nbsp; prestats=false &amp;nbsp;WHERE index="test_network_metrics" AND host="*" span=10m by host&lt;BR /&gt;| fields *&lt;BR /&gt;&lt;BR /&gt;SingleStat Panel&lt;BR /&gt;| fields QrySuccess&lt;BR /&gt;| eval Success=QrySuccess/300&lt;BR /&gt;| stats sum(Success)&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="success_qps.png" style="width: 200px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11690i3663D725FF83D346/image-size/small?v=v2&amp;amp;px=200" role="button" title="success_qps.png" alt="success_qps.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;SPAN&gt;Timechart Panel&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| fields QrySuccess host&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;| timechart span=10m latest(QrySuccess) as Success by host&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-11-02 at 6.24.55 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11691i4A7B1F018FC2E5BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-11-02 at 6.24.55 AM.png" alt="Screen Shot 2020-11-02 at 6.24.55 AM.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;The numbers don't exactly look right as at peak I am expecting traffic on the order of thousands per second.&amp;nbsp; I am thinking that I botched the stats.&amp;nbsp; System wide, I am running about 14M qph or about 3900 qps.&amp;nbsp; If I leave off the division by 300 convert 5min to 1sec, it looks closer to normal, or about 30% of what I am expecting.&amp;nbsp; Below is what I get from processing hourly summaries of DNS query transaction logs.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screen Shot 2020-11-02 at 6.06.41 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11693iDC5A635355C8A630/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-11-02 at 6.06.41 AM.png" alt="Screen Shot 2020-11-02 at 6.06.41 AM.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;I experimented with summing the latest on the target field, but the numbers come out about the same.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;| fields QrySuccess host&lt;BR /&gt;| fillnull value=0.0 QrySuccess&lt;BR /&gt;| stats latest(QrySuccess) as Success by host&lt;BR /&gt;| addcoltotals labelfield=host fieldname=Success&lt;BR /&gt;| tail 1&lt;BR /&gt;| fields Success&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 Nov 2020 17:28:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Splunk-metrics-and-counters/m-p/528568#M8568</guid>
      <dc:creator>peiffer</dc:creator>
      <dc:date>2020-11-09T17:28:14Z</dc:date>
    </item>
  </channel>
</rss>

