<?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: Adding dedup _raw before timechart returns 0 results in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197670#M57112</link>
    <description>&lt;P&gt;Careful with that.  Depending on the volume and timestamp extraction you can have many legit non-duplicate events with the same timestamp that will hidded by deduping _time.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jan 2014 19:36:17 GMT</pubDate>
    <dc:creator>lukejadamec</dc:creator>
    <dc:date>2014-01-07T19:36:17Z</dc:date>
    <item>
      <title>Adding dedup _raw before timechart returns 0 results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197665#M57107</link>
      <description>&lt;P&gt;I apologize if this is asked already but I search to no avail.&lt;/P&gt;

&lt;P&gt;When writing a Splunk query that will eventually be used for summary indexing using sitimechart, I have this query: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=app sourcetype=&amp;lt;removed&amp;gt; host=&amp;lt;removed&amp;gt; earliest=-10d
    | eval Success_Count=if(scs=="True",1,0)
    | eval Failure_Count=if(scs=="False",0,1)
    | timechart span=1d sum(Success_Count) as SuccessCount sum(Failure_Count) as FailureCount count as TotalCount by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Results are as expected.  However, some data was accidentally indexed twice, so I need to remove duplicates.  If I'm doing a regular search, I just use &lt;CODE&gt;| dedup _raw&lt;/CODE&gt; to remove the identical events.  However, if I run the following query, I get zero results returned (no matter where I put &lt;CODE&gt;| dedup _raw&lt;/CODE&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=app sourcetype=&amp;lt;removed&amp;gt; host=&amp;lt;removed&amp;gt; earliest=-10d
    | dedup _raw
    | eval Success_Count=if(scs=="True",1,0)
    | eval Failure_Count=if(scs=="False",0,1)
    | timechart span=1d sum(Success_Count) as SuccessCount count(Failure_Count) as FailureCount count as TotalCount by host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What am I doing wrong?  I'm using Splunk 4.3.2.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2014 17:50:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197665#M57107</guid>
      <dc:creator>tommy_o</dc:creator>
      <dc:date>2014-01-07T17:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dedup _raw before timechart returns 0 results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197666#M57108</link>
      <description>&lt;P&gt;There's a type-o on the &lt;CODE&gt;eval Failure_Count&lt;/CODE&gt; line, but the reCaptcha blocked me from editing &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;  Edit: there should have been &lt;CODE&gt;sum(), sum(), count&lt;/CODE&gt; but again, captcha is keeping me from fixing that.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2014 17:55:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197666#M57108</guid>
      <dc:creator>tommy_o</dc:creator>
      <dc:date>2014-01-07T17:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dedup _raw before timechart returns 0 results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197667#M57109</link>
      <description>&lt;P&gt;When you said the data was duplicated, duplicate events have same timestamp or different?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2014 18:44:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197667#M57109</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-01-07T18:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dedup _raw before timechart returns 0 results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197668#M57110</link>
      <description>&lt;P&gt;Try following&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=app sourcetype=&amp;lt;removed&amp;gt; host=&amp;lt;removed&amp;gt; earliest=-10d
    | fields _time, scs,host
    | dedup _time, scs,host
    | timechart span=1d count(eval(scs="True")) as SuccessCount count(eval(scs="False")) as FailureCount count as TotalCount by host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Jan 2014 18:52:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197668#M57110</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-01-07T18:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dedup _raw before timechart returns 0 results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197669#M57111</link>
      <description>&lt;P&gt;They have the same timestamp&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2014 19:21:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197669#M57111</guid>
      <dc:creator>tommy_o</dc:creator>
      <dc:date>2014-01-07T19:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dedup _raw before timechart returns 0 results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197670#M57112</link>
      <description>&lt;P&gt;Careful with that.  Depending on the volume and timestamp extraction you can have many legit non-duplicate events with the same timestamp that will hidded by deduping _time.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2014 19:36:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197670#M57112</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2014-01-07T19:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dedup _raw before timechart returns 0 results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197671#M57113</link>
      <description>&lt;P&gt;True, best approach would to be to include all the fields which make an event unique in the "fields" and "dedup" clause, so that all those legit events are not getting filtered out.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2014 19:43:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197671#M57113</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-01-07T19:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dedup _raw before timechart returns 0 results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197672#M57114</link>
      <description>&lt;P&gt;I was under the impression that I couldn't use &lt;CODE&gt;eval()&lt;/CODE&gt; on the same line as sitimechart (which I will be switching over to once I've ironed out this duplicate problem).  Is that not correct?  This is essentially what my query looked like originally.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2014 19:48:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197672#M57114</guid>
      <dc:creator>tommy_o</dc:creator>
      <dc:date>2014-01-07T19:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dedup _raw before timechart returns 0 results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197673#M57115</link>
      <description>&lt;P&gt;I am able to use eval() in the sameline as sitimechart command (and don't see any restriction about same in the documentation).&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2014 20:33:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197673#M57115</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-01-07T20:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dedup _raw before timechart returns 0 results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197674#M57116</link>
      <description>&lt;P&gt;Okay, thank you for the confirmation.  That was written in an internal corporate document and I wasn't getting any summary data in my index -- I was thinking my use of eval on the same line as sitimechart may have been causing that problem (but glad to hear that it shouldnt be).  Thanks again.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2014 21:05:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197674#M57116</guid>
      <dc:creator>tommy_o</dc:creator>
      <dc:date>2014-01-07T21:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: Adding dedup _raw before timechart returns 0 results</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197675#M57117</link>
      <description>&lt;P&gt;Is your duplicate records issue resolved?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2014 21:28:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-dedup-raw-before-timechart-returns-0-results/m-p/197675#M57117</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-01-07T21:28:19Z</dc:date>
    </item>
  </channel>
</rss>

