<?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: Summary Index getting populated with incorrect data in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Summary-Index-getting-populated-with-incorrect-data/m-p/286732#M2523</link>
    <description>&lt;P&gt;Thanks for the answer. There are multiple other conditions also in this data which i have not explained. So i can't use dedup, because evenif id+path combination is unique there are other fields which can be different. So based on certain conditions, we extract the required fields from these files after using transaction command. so removing duplicated based on these 2 fields might remove the data that is required.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jun 2016 19:02:17 GMT</pubDate>
    <dc:creator>Roopaul</dc:creator>
    <dc:date>2016-06-03T19:02:17Z</dc:date>
    <item>
      <title>Summary Index getting populated with incorrect data</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Summary-Index-getting-populated-with-incorrect-data/m-p/286730#M2521</link>
      <description>&lt;P&gt;Hi, I am getting logs from 2 servers which is exactly same unless there is some failure. We have to group the events based on an Id and consider it as a single event for reporting. So i used 'transaction' command. When I ran the query as a stand-alone it gives correct count as expected. But while it gets written to SI its giving wrong results. This SI is getting populate every hour.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test | fields content
| rex field=content "\n*Id:(?P&amp;lt;Id&amp;gt;\d[^~]+)"  
| rex field=content "\n*Path\:(?&amp;lt;path&amp;gt;[^~|?]+)"
| transaction Id keepevicted=true
| fillnull value=NA path
| replace  "" with "NA" in path
| bucket _time span=1h
| stats count by _time,path
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;content from hostA&lt;BR /&gt;
time1 Id:A Path:AB1&lt;BR /&gt;
time1 Id:A Path:AB2&lt;BR /&gt;
time2 Id:B Path:AC1&lt;BR /&gt;
time2 Id:C Path:AC1&lt;/P&gt;

&lt;P&gt;content from hostB&lt;BR /&gt;
time1 Id:A Path:AB1&lt;BR /&gt;
time1 Id:A Path:AB2&lt;BR /&gt;
time2 Id:B Path:AC1&lt;BR /&gt;
time2 Id:C Path:AC1&lt;/P&gt;

&lt;P&gt;Output while running standalone: - this is expected to fill in summary&lt;BR /&gt;
time1 AB1  1&lt;BR /&gt;
time1 AB2  1&lt;BR /&gt;
time2 Ac1  2&lt;/P&gt;

&lt;P&gt;Output while writing to summary: - this is counting from both the servers&lt;BR /&gt;
time1 AB1  2&lt;BR /&gt;
time1 AB2  2&lt;BR /&gt;
time2 Ac1  4&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2016 17:43:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Summary-Index-getting-populated-with-incorrect-data/m-p/286730#M2521</guid>
      <dc:creator>Roopaul</dc:creator>
      <dc:date>2016-06-03T17:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Index getting populated with incorrect data</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Summary-Index-getting-populated-with-incorrect-data/m-p/286731#M2522</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=test | fields content
 | rex field=content "\n*Id:(?P&amp;lt;Id&amp;gt;\d[^~]+)"  
 | rex field=content "\n*Path\:(?&amp;lt;path&amp;gt;[^~|?]+)"
 | fillnull value=NA path
 | replace  "" with "NA" in path
 |dedup Id path
 | bucket _time span=1h
 | stats count by _time,path
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Update&lt;/STRONG&gt;&lt;BR /&gt;
Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search giving your result from both host and all 5 fields
| table _time Id Path otherfield1 otherfield2 otherfield3...
| fillnull value=NA path
| replace  "" with "NA" in path
| stats values(*) as * by _time Id
 | bucket _time span=1h
 | stats count by _time,path
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Jun 2016 18:54:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Summary-Index-getting-populated-with-incorrect-data/m-p/286731#M2522</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-06-03T18:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Index getting populated with incorrect data</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Summary-Index-getting-populated-with-incorrect-data/m-p/286732#M2523</link>
      <description>&lt;P&gt;Thanks for the answer. There are multiple other conditions also in this data which i have not explained. So i can't use dedup, because evenif id+path combination is unique there are other fields which can be different. So based on certain conditions, we extract the required fields from these files after using transaction command. so removing duplicated based on these 2 fields might remove the data that is required.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2016 19:02:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Summary-Index-getting-populated-with-incorrect-data/m-p/286732#M2523</guid>
      <dc:creator>Roopaul</dc:creator>
      <dc:date>2016-06-03T19:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Index getting populated with incorrect data</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Summary-Index-getting-populated-with-incorrect-data/m-p/286733#M2524</link>
      <description>&lt;P&gt;I've seen  Splunk behaving differently when using transaction command (it's a resource intensive command and since scheduled searches have lower priority than ad-hoc, it has to work with (less) available resources). Consider replacing it with a stats or something. If you can add your full search in the question, answer community can help you with a solution .&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jun 2016 19:23:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Summary-Index-getting-populated-with-incorrect-data/m-p/286733#M2524</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-06-03T19:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Summary Index getting populated with incorrect data</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Summary-Index-getting-populated-with-incorrect-data/m-p/286734#M2525</link>
      <description>&lt;P&gt;This is my requirement &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Hope this helps.&lt;/P&gt;

&lt;P&gt;hostA:&lt;BR /&gt;
Field1 | Field2 | Field3 | Field4 | Field5&lt;BR /&gt;
time1  | Id1    | path1  | dog1   |&lt;BR /&gt;&lt;BR /&gt;
time1  | Id1    | path1  |  _____  | cat1&lt;BR /&gt;
time1  | Id2    | path1  | dog1   |&lt;BR /&gt;&lt;BR /&gt;
time1  | Id2    | path1  |____&lt;STRONG&gt;&lt;EM&gt;| cat1&lt;BR /&gt;
time2  | Id3    | path2  | dog2   |&lt;BR /&gt;&lt;BR /&gt;
time2  | Id3    | path2  | _&lt;/EM&gt;&lt;/STRONG&gt;__ | cat2&lt;BR /&gt;
time2  | Id4    | path2  | dog2   |  &lt;/P&gt;

&lt;P&gt;hostB:&lt;BR /&gt;
Field1 | Field2 | Field3 | Field4 | Field5&lt;BR /&gt;
time1  | Id1    | path1  | dog1   |&lt;BR /&gt;&lt;BR /&gt;
time1  | Id1    | path1  |  _____  | cat1&lt;BR /&gt;
time1  | Id2    | path1  | dog1   |&lt;BR /&gt;&lt;BR /&gt;
time1  | Id2    | path1  |____&lt;STRONG&gt;&lt;EM&gt;| cat1&lt;BR /&gt;
time2  | Id3    | path2  | dog2   |&lt;BR /&gt;&lt;BR /&gt;
time2  | Id3    | path2  | _&lt;/EM&gt;&lt;/STRONG&gt;__ | cat2&lt;BR /&gt;
time2  | Id5    | path2  | dog2   |  &lt;/P&gt;

&lt;P&gt;I want the out to be like this and want this to be stored in a summary index.&lt;/P&gt;

&lt;P&gt;Field1 | Field3 | Field4 | Field5 | Count&lt;BR /&gt;
time1  | path1  | dog1   |  cat1  | 1&lt;BR /&gt;
time1  | path1  | dog1   |  cat1  | 1&lt;BR /&gt;
time2  | path2  | dog2   |  cat2  | 1&lt;BR /&gt;
time2  | path2  | dog2   | NA     | 2 &lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2016 02:42:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Summary-Index-getting-populated-with-incorrect-data/m-p/286734#M2525</guid>
      <dc:creator>Roopaul</dc:creator>
      <dc:date>2016-06-04T02:42:12Z</dc:date>
    </item>
  </channel>
</rss>

