<?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: Transaction search and appendcols - missing cols in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321723#M96117</link>
    <description>&lt;P&gt;When you do head that way, check out the March 2016 session from &lt;A href="http://wiki.splunk.com/Virtual_.conf"&gt;http://wiki.splunk.com/Virtual_.conf&lt;/A&gt; for more.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Feb 2017 23:23:48 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2017-02-22T23:23:48Z</dc:date>
    <item>
      <title>Transaction search and appendcols - missing cols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321711#M96105</link>
      <description>&lt;P&gt;Hey folks,&lt;/P&gt;

&lt;P&gt;I have two separate searches that work fine and return the expected results. I.e.&lt;/P&gt;

&lt;P&gt;1 - &lt;BR /&gt;
index=blah field1!=this field2!=that field3!=stuff TICKNUM&amp;gt;=1 | bucket span=1d _time |transaction FIELD1 FIELD2 | stats avg(duration) as Avg_Duration by FIELD1 FIELD2 | some more time stuff | table FIELD1 FIELD2  Avg_Duration&lt;/P&gt;

&lt;P&gt;2-&lt;BR /&gt;&lt;BR /&gt;
index=blah field1!=this field2!=that field3!=stuff TICKNUM&amp;gt;=1 |stats count by FIELD1 FIELD2&lt;/P&gt;

&lt;P&gt;When I add the second search as an appendcols I notice that some of the counts are blank  / missing. I suspect my appendcols isn't joining properly.. I also tried to create a dummy common field (eval = FIELD1+FIELD2) in both searches in the hope that they would be used as the join but no success..&lt;/P&gt;

&lt;P&gt;thx!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:00:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321711#M96105</guid>
      <dc:creator>RocIngersol</dc:creator>
      <dc:date>2020-09-29T13:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction search and appendcols - missing cols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321712#M96106</link>
      <description>&lt;P&gt;Try like this (it can be done via join as well but they are expensive so, try this append-stats alternative of join)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=blah field1!=this field2!=that field3!=stuff TICKNUM&amp;gt;=1 | bucket span=1d _time |transaction FIELD1 FIELD2 | stats avg(duration) as Avg_Duration by FIELD1 FIELD2 | some more time stuff | table FIELD1 FIELD2 Avg_Duration
| append [search index=blah field1!=this field2!=that field3!=stuff TICKNUM&amp;gt;=1 |stats count by FIELD1 FIELD2 ]
| stats values(*) as * by FIELD1 FIELD2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Feb 2017 21:50:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321712#M96106</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-21T21:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction search and appendcols - missing cols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321713#M96107</link>
      <description>&lt;P&gt;&lt;CODE&gt;appendcols&lt;/CODE&gt; is no &lt;CODE&gt;join&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Add &lt;CODE&gt;sum(eventcount) as count&lt;/CODE&gt; to the first &lt;CODE&gt;stats&lt;/CODE&gt; and skip the second search entirely.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 21:51:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321713#M96107</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-02-21T21:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction search and appendcols - missing cols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321714#M96108</link>
      <description>&lt;P&gt;appendcols is no join  -&amp;lt; that explains a lot.&lt;/P&gt;

&lt;P&gt;Re adding that to the first stats? That doesn't work as I need to use by fields later in the search.  Using stats there breaks the rest of my search.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 22:26:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321714#M96108</guid>
      <dc:creator>RocIngersol</dc:creator>
      <dc:date>2017-02-21T22:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction search and appendcols - missing cols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321715#M96109</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=blah field1!=this field2!=that field3!=stuff TICKNUM&amp;gt;=1 
| bucket span=1d _time 
|transaction FIELD1 FIELD2 
| stats avg(duration) as Avg_Duration sum(eventcount) as count by FIELD1 FIELD2 
| some more time stuff 
| table FIELD1 FIELD2 Avg_Duration
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Feb 2017 22:28:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321715#M96109</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-02-21T22:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction search and appendcols - missing cols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321716#M96110</link>
      <description>&lt;P&gt;Thx. What I'm trying to do is have  stats count by FIELD1 FIELD2 appended as a column, seperate to the transaction stuff.  Doing the sum(eventcount) is just totalling the bucketed 1d _time buckets, not all the actual occurrences from what I can see.. &lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 12:57:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321716#M96110</guid>
      <dc:creator>RocIngersol</dc:creator>
      <dc:date>2017-02-22T12:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction search and appendcols - missing cols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321717#M96111</link>
      <description>&lt;P&gt;The &lt;CODE&gt;eventcount&lt;/CODE&gt; field should have the count of events per transaction, and the sum of that should be your overall count of events. The &lt;CODE&gt;bucket&lt;/CODE&gt; shouldn't have any effect because you're not grouping by time in the &lt;CODE&gt;stats&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 15:25:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321717#M96111</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-02-22T15:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction search and appendcols - missing cols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321718#M96112</link>
      <description>&lt;P&gt;Trying that --&lt;/P&gt;

&lt;P&gt;stats avg(duration) as Avg_Duration sum(eventcount) as count by FIELD1 FIELD2 &lt;/P&gt;

&lt;P&gt;sum(eventcount) is never the sum - it's always the value of event count.... &lt;/P&gt;

&lt;P&gt;tried a table at the end too. I'll keep poking..&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 16:05:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321718#M96112</guid>
      <dc:creator>RocIngersol</dc:creator>
      <dc:date>2017-02-22T16:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction search and appendcols - missing cols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321719#M96113</link>
      <description>&lt;P&gt;Sorry - I meant to say (!!) I do a dedupe on _time after my bucket 1d. That explains why sum(event count) doesn't work....&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 16:56:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321719#M96113</guid>
      <dc:creator>RocIngersol</dc:creator>
      <dc:date>2017-02-22T16:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction search and appendcols - missing cols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321720#M96114</link>
      <description>&lt;P&gt;I see... no way to know what you left out of your question &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Alternatively, you can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eventstats count by FIELD1 FIELD2 | ... blah blah dedup whatever ... | stats avg(duration) first(count) by FIELD1 FIELD2 | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It won't be that efficient, but in the context of &lt;CODE&gt;transaction&lt;/CODE&gt; that won't matter much.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 19:18:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321720#M96114</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-02-22T19:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction search and appendcols - missing cols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321721#M96115</link>
      <description>&lt;P&gt;I know - my bad - leaving out a killer _time dedup !! Anyway, eventstats - that worked a charm. Thanks a lot.  I should probably drop transaction in favour or stats and eventstats too - but that is for another day &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thx again! R&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 22:40:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321721#M96115</guid>
      <dc:creator>RocIngersol</dc:creator>
      <dc:date>2017-02-22T22:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction search and appendcols - missing cols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321722#M96116</link>
      <description>&lt;P&gt;Thanks a lot for your comments -  your append worked but I opted for the eventstats method instead. Thx!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 22:41:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321722#M96116</guid>
      <dc:creator>RocIngersol</dc:creator>
      <dc:date>2017-02-22T22:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction search and appendcols - missing cols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321723#M96117</link>
      <description>&lt;P&gt;When you do head that way, check out the March 2016 session from &lt;A href="http://wiki.splunk.com/Virtual_.conf"&gt;http://wiki.splunk.com/Virtual_.conf&lt;/A&gt; for more.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 23:23:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transaction-search-and-appendcols-missing-cols/m-p/321723#M96117</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2017-02-22T23:23:48Z</dc:date>
    </item>
  </channel>
</rss>

