<?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: Why am I getting an incorrect stats count from my transaction search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165693#M47108</link>
    <description>&lt;P&gt;But again, unless we tell Splunk to create a MV field with duplicate values, this will not work.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2015 18:59:54 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-08-11T18:59:54Z</dc:date>
    <item>
      <title>Why am I getting an incorrect stats count from my transaction search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165690#M47105</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Stats count does not count all instances of variables when I use it with transactions.&lt;/P&gt;

&lt;P&gt;Search string: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=alto-alpha (version version=*) OR PresentationStopReason | transaction host startswith=version | search PresentationStopReason 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;gives the following results:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2015-08-11 08:25:07.458     Info: Starting Proximity Desktop version="desktop-1.0.0-Alpha47" OS_TYPE="osx" QT_VERSION="5.3.2" OSX_VERSION="OS X Mavericks (10.9)"
2015-08-11 09:37:37.877     Info: Connection to endpoint lost, and presentation stopped. PresentationStopReason=NetworkLost
host = 144f9ce211086089578cff547fcb17ae sourcetype = syslog_osx_qt

level="Info" uptime=000.001 Starting Proximity Desktop version="desktop-1.0.0-Alpha39" OS_TYPE="win"
level="Info" uptime=1887.327 EndpointControlAction=StopSharing PresentationStopReason=UserInput
host = dbb672153803a6d8386f0b5839697ab5 sourcetype = syslog_win_qt

2015-08-10 16:39:44.975     Info: Starting Proximity Desktop version="desktop-1.0.0-Alpha47" OS_TYPE="osx" QT_VERSION="5.3.2" OSX_VERSION="OS X Yosemite (10.10)"
2015-08-10 16:56:39.911     Info: EndpointControlAction=StopSharing PresentationStopReason=UserInput
host = 3bcefedc3125186c883196f74c99cdb8 sourcetype = syslog_osx_qt

2015-08-10 16:14:38.144     Info: Starting Proximity Desktop version="desktop-1.0.0-Alpha47" OS_TYPE="osx" QT_VERSION="5.3.2" OSX_VERSION="OS X Yosemite (10.10)"
2015-08-10 16:15:04.600     Info: Pairing to endpoint lost, and presentation stopped. PresentationStopReason=PairingLost
2015-08-10 16:15:17.717     Info: Pairing to endpoint lost, and presentation stopped. PresentationStopReason=PairingLost
2015-08-10 16:15:33.252     Info: Pairing to endpoint lost, and presentation stopped. PresentationStopReason=PairingLost
2015-08-10 16:15:40.505     Info: Pairing to endpoint lost, and presentation stopped. PresentationStopReason=PairingLost
2015-08-10 16:15:48.252     Info: Pairing to endpoint lost, and presentation stopped. PresentationStopReason=PairingLost
2015-08-10 16:48:40.083     Info: EndpointControlAction=StopSharing PresentationStopReason=UserInput
host = 8f8567f4c2d021e1e7f79132f90bceae sourcetype = syslog_osx_qt

2015-08-10 16:13:44.281     Info: Starting Proximity Desktop version="desktop-1.0.0-Alpha47" OS_TYPE="osx" QT_VERSION="5.3.2" OSX_VERSION="OS X Yosemite (10.10)"
2015-08-10 16:13:49.741     Info: Pairing to endpoint lost, and presentation stopped. PresentationStopReason=PairingLost
2015-08-10 16:13:58.410     Info: Pairing to endpoint lost, and presentation stopped. PresentationStopReason=PairingLost
2015-08-10 16:14:09.546     Info: Pairing to endpoint lost, and presentation stopped. PresentationStopReason=PairingLost
host = 8f8567f4c2d021e1e7f79132f90bceae sourcetype = syslog_osx_qt

2015-08-10 16:13:12.804     Info: Starting Proximity Desktop version="desktop-1.0.0-Alpha47" OS_TYPE="osx" QT_VERSION="5.3.2" OSX_VERSION="OS X Yosemite (10.10)"
2015-08-10 16:13:20.478     Info: Pairing to endpoint lost, and presentation stopped. PresentationStopReason=PairingLost
2015-08-10 16:13:29.461     Info: Pairing to endpoint lost, and presentation stopped. PresentationStopReason=PairingLost
host = 8f8567f4c2d021e1e7f79132f90bceae sourcetype = syslog_osx_qt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There are 14 instances of the PresentationStopReason field in the results. When adding &lt;CODE&gt;|stats count by PresentationStopReason&lt;/CODE&gt; to the search string, the result is as following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=alto-alpha (version version=*) OR PresentationStopReason | transaction host startswith=version | search PresentationStopReason | stats count by PresentationStopReason

PresentationStopReason  count
NetworkLost              1
PairingLost              3
UserInput                  3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Giving a total of 7 instances of PresentationStopReason, when there should be 14.  Stats count is not working the way I expect. How can I count all the instances of PresentationStopReason? PairingLost should be 10.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 10:02:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165690#M47105</guid>
      <dc:creator>DanPederEriksen</dc:creator>
      <dc:date>2015-08-11T10:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting an incorrect stats count from my transaction search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165691#M47106</link>
      <description>&lt;P&gt;This is because stats counts the number of events with each value; the way that you have orchestrated things, any event will only be counted once for any specific value.  This is not a bug, although it may be a bit surprising to some.  The full reason is that while a field may be &lt;CODE&gt;multivalued&lt;/CODE&gt;, Splunk doesn't create any event's multivalued field with the same value more than once unless you force it to.  Your results are telling you that there are 3 events for which the field &lt;CODE&gt;PresentationStopReason&lt;/CODE&gt; has the value &lt;CODE&gt;PairingLost&lt;/CODE&gt;, which is correct.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 15:54:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165691#M47106</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-11T15:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting an incorrect stats count from my transaction search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165692#M47107</link>
      <description>&lt;P&gt;you can do mvexpand on the PresentationStopReason field before the stats if you want to count each value individually.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 18:40:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165692#M47107</guid>
      <dc:creator>steveyz</dc:creator>
      <dc:date>2015-08-11T18:40:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting an incorrect stats count from my transaction search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165693#M47108</link>
      <description>&lt;P&gt;But again, unless we tell Splunk to create a MV field with duplicate values, this will not work.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 18:59:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165693#M47108</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-08-11T18:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting an incorrect stats count from my transaction search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165694#M47109</link>
      <description>&lt;P&gt;The MV field output from the transaction command is similar to "|stats values(field)"  (remove duplicate values), not "| stats list(field)" (keep all values). So count correctly , you can try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=alto-alpha (version version=*) OR PresentationStopReason | transaction host startswith=version | search PresentationStopReason | rex max_match=0 "PresentationStopReason=(?&amp;lt;PresentationStopReason&amp;gt;\w+)" | stats count by PresentationStopReason
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Aug 2015 19:05:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165694#M47109</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-08-11T19:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting an incorrect stats count from my transaction search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165695#M47110</link>
      <description>&lt;P&gt;How would I go about counting fields with the same values?&lt;/P&gt;

&lt;P&gt;Adding &lt;CODE&gt;mvlist=true&lt;/CODE&gt; to the transaction almost gets me there, The only problem is that in also creates the value &lt;CODE&gt;NULL&lt;/CODE&gt; and counts it. E.g:&lt;BR /&gt;
PresentationStopReason  count&lt;BR /&gt;
NULL    3&lt;BR /&gt;
PairingLost 1&lt;BR /&gt;
UserInput   3&lt;/P&gt;

&lt;P&gt;If I only could remove the NULL. &lt;/P&gt;

&lt;P&gt;One other approach would be expand the events inside the transaction?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2015 19:05:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165695#M47110</guid>
      <dc:creator>DanPederEriksen</dc:creator>
      <dc:date>2015-08-11T19:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I getting an incorrect stats count from my transaction search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165696#M47111</link>
      <description>&lt;P&gt;This search query produces the result I am after. Thanks somesoni2!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2015 07:07:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-am-I-getting-an-incorrect-stats-count-from-my-transaction/m-p/165696#M47111</guid>
      <dc:creator>DanPederEriksen</dc:creator>
      <dc:date>2015-08-12T07:07:38Z</dc:date>
    </item>
  </channel>
</rss>

