<?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: How to display the proper counts of the messages in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545432#M37468</link>
    <description>&lt;P&gt;Still not clear how you want to divide up the counts e.g. counts of exceptions by day? count by app_name? count by app_name and day? By including _time in your stats command, this divides the counts up by the timestamp, so unless you have lots of exceptions in the same millisecond, you are unlikely to get counts above 1&lt;/P&gt;</description>
    <pubDate>Thu, 25 Mar 2021 15:22:15 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-03-25T15:22:15Z</dc:date>
    <item>
      <title>How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545278#M37447</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;I have one requirement&lt;/P&gt;&lt;P&gt;I have created one alert like below:&lt;/P&gt;&lt;P&gt;index=abc ns IN ("blazepsfpublish", "blazegateway", "blazegateway-c2","blazepsfsubscribememsql","blazepsfsubscribememsql-c2","sidh-bulk-processor","sidh-datagraph3","sidh-datagraph3-c2","sidh-noss") "NullPointerException" | rex "message=(?&amp;lt;ExceptionMessage&amp;gt;[^\n]+)"|dedup ExceptionMessage,ns|eval _time = strftime(_time,"%Y-%m-%d %H:%M:%S.%3N")|table app_name, ExceptionMessage ,_time, environment, pod_name,ns|rename app_name as APP_NAME, _time as Time, environment as Environment, pod_name as Pod_Name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue I am facing is there are some messages that are similar like below:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;2021-03-17T10:39:32.268286963Z&lt;/SPAN&gt; &lt;SPAN class="t"&gt;app_name=publishpushapi&lt;/SPAN&gt; &lt;SPAN class="t"&gt;environment=e1&lt;/SPAN&gt; &lt;SPAN class="t"&gt;ns=blazepsfpublish&lt;/SPAN&gt; &lt;SPAN class="t"&gt;pod_container=publishpushapi&lt;/SPAN&gt; &lt;SPAN class="t"&gt;pod_name=publishpushapi-deployment-66-gz8dm&lt;/SPAN&gt; &lt;SPAN class="t"&gt;stream=stdout&lt;/SPAN&gt; &lt;SPAN class="t"&gt;message=java.lang.&lt;SPAN class="t a"&gt;NullPointerException&lt;/SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN class="t"&gt;null&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;2021-03-17T10:39:16.982803933Z app_name=publishpushapi environment=e1 ns=blazepsfpublish pod_container=publishpushapi pod_name=publishpushapi-deployment-66-gz8dm stream=stdout message=java.lang.&lt;SPAN class="t a"&gt;NullPointerException&lt;/SPAN&gt;: null&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;I have already used dedup .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;But I want that count should come proper like if similar messages are 7 then the message display will be 1 and count will be 7.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;with stats count I am getting only 1 count.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;Can someone guide me on this&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 07:22:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545278#M37447</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-03-25T07:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545297#M37448</link>
      <description>&lt;P&gt;At what point in your query are you doing the stats command?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 09:04:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545297#M37448</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-03-25T09:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545298#M37449</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have used like this:&lt;/P&gt;&lt;P&gt;index=abc ns IN ("blazepsfpublish", "blazegateway", "blazegateway-c2","blazepsfsubscribememsql","blazepsfsubscribememsql-c2","sidh-bulk-processor","sidh-datagraph3","sidh-datagraph3-c2","sidh-noss") "NullPointerException" | rex "message=(?&amp;lt;ExceptionMessage&amp;gt;[^\n]+)"|dedup ExceptionMessage,ns|eval _time = strftime(_time,"%Y-%m-%d %H:%M:%S.%3N")|stats count by app_name, ExceptionMessage ,_time, environment, pod_name,ns|rename app_name as APP_NAME, _time as Time, environment as Environment, pod_name as Pod_Name&lt;/P&gt;&lt;P&gt;But I am getting count as 1 even if some of the messages are similar.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 09:07:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545298#M37449</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-03-25T09:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545299#M37450</link>
      <description>&lt;P&gt;The dedup before the stats has removed al but the first event matching the combination of&amp;nbsp;&lt;SPAN&gt;ExceptionMessage and ns, which is why your counts will always be 1.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 09:10:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545299#M37450</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-03-25T09:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545300#M37451</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what I should I do to get the correct count.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 09:12:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545300#M37451</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-03-25T09:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545301#M37452</link>
      <description>&lt;P&gt;Try removing the dedup&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 09:13:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545301#M37452</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-03-25T09:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545310#M37453</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried like this after removing dedup.&lt;/P&gt;&lt;P&gt;But I am getting No result&lt;/P&gt;&lt;P&gt;index=abc&amp;nbsp; ns IN ("blazepsfpublish", "blazegateway", "blazegateway-c2","blazepsfsubscribememsql","blazepsfsubscribememsql-c2","sidh-bulk-processor","sidh-datagraph3","sidh-datagraph3-c2","sidh-noss") "NullPointerException" | rex "message=(?&amp;lt;ExceptionMessage&amp;gt;[^\n]+)"|eval _time = strftime(_time,"%Y-%m-%d %H:%M:%S.%3N")|stats count by app_name, ExceptionMessage ,_time, environment, pod_name,ns|rename app_name as APP_NAME, _time as Time, environment as Environment, pod_name as Pod_Name&lt;/P&gt;&lt;P&gt;Can you guide me where I am wrong&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 09:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545310#M37453</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-03-25T09:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545315#M37454</link>
      <description>&lt;P&gt;I am not sure why you would get "No result" - do you get an error? Also, what are you trying to do with the stats command? You have included _time in the grouping and with so many other fields to group on, I wouldn't be surprised if all of your counts turn out to be 1 anyway.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 09:59:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545315#M37454</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-03-25T09:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545318#M37456</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then what should I removed from the stats command.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 10:04:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545318#M37456</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-03-25T10:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545319#M37457</link>
      <description>&lt;P&gt;Probably not given that you want counts of something. The question is what are you trying to count?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 10:07:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545319#M37457</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-03-25T10:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545320#M37458</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to count exception messages&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 10:09:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545320#M37458</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-03-25T10:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545322#M37459</link>
      <description>&lt;P&gt;Given that your search already filters on NullPointerException&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats count&lt;/LI-CODE&gt;&lt;P&gt;will give you the count of events matching the search in your time period. Is this what you want?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 10:13:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545322#M37459</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-03-25T10:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545420#M37464</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes I want the club count of the messages that are similar.&lt;/P&gt;&lt;P&gt;But stats count is giving one count only&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 14:53:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545420#M37464</guid>
      <dc:creator>aditsss</dc:creator>
      <dc:date>2021-03-25T14:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to display the proper counts of the messages</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545432#M37468</link>
      <description>&lt;P&gt;Still not clear how you want to divide up the counts e.g. counts of exceptions by day? count by app_name? count by app_name and day? By including _time in your stats command, this divides the counts up by the timestamp, so unless you have lots of exceptions in the same millisecond, you are unlikely to get counts above 1&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 15:22:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-the-proper-counts-of-the-messages/m-p/545432#M37468</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-03-25T15:22:15Z</dc:date>
    </item>
  </channel>
</rss>

