<?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 find events with duplicate field in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-find-events-with-duplicate-field/m-p/188304#M37549</link>
    <description>&lt;P&gt;Did this work for you?&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jul 2015 04:47:38 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-07-07T04:47:38Z</dc:date>
    <item>
      <title>How to find events with duplicate field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-find-events-with-duplicate-field/m-p/188300#M37545</link>
      <description>&lt;P&gt;Our application had a defect in a logging interceptor that led to a field being duplicated in an event but where both values didn't match. I am trying to verify the fix but am having difficulty in coming up with a query.&lt;/P&gt;

&lt;P&gt;How can I find all events where a field is listed twice in the same event but where both values are not equal?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 14:21:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-find-events-with-duplicate-field/m-p/188300#M37545</guid>
      <dc:creator>barrysvee</dc:creator>
      <dc:date>2015-07-01T14:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to find events with duplicate field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-find-events-with-duplicate-field/m-p/188301#M37546</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eventstats values(BrokenFIeld) dc(BrokenField) AS numDistinctValues count(BrokenField) AS numValues by _serial | where numValues&amp;gt;1 AND numDistinctValues&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jul 2015 14:57:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-find-events-with-duplicate-field/m-p/188301#M37546</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-01T14:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to find events with duplicate field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-find-events-with-duplicate-field/m-p/188302#M37547</link>
      <description>&lt;P&gt;Thank you, that does produce a list of events that shows both BrokenField fields but does not filter to just the ones where both are unequal. If I add a known BrokenField value to the query I do see just the ones with that known value plus the unequal values. I'm losing the events with unequal values in the sea of events where they are correctly equal.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 15:45:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-find-events-with-duplicate-field/m-p/188302#M37547</guid>
      <dc:creator>barrysvee</dc:creator>
      <dc:date>2015-07-01T15:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to find events with duplicate field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-find-events-with-duplicate-field/m-p/188303#M37548</link>
      <description>&lt;P&gt;Are you sure?  The search is pretty sold.  The &lt;CODE&gt;numValues&amp;gt;1&lt;/CODE&gt; should drop out any events that do not have a multi-valued "BrokenField".  The &lt;CODE&gt;numDistinctValues&amp;gt;1&lt;/CODE&gt;  should drop out any events that do not have more than one value (e.g. that have the same value) for "BrokenField".&lt;/P&gt;

&lt;P&gt;In any case, this simpler approach should also work for a 2-value-only case:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval BV1=mvindex(BrokenValue,0) | eval BV2=mvindex(BrokenValue,1) | where isnotnull(BV1) AND isnotnull(BV2) AND BV1!=BV2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Jul 2015 16:01:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-find-events-with-duplicate-field/m-p/188303#M37548</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-01T16:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to find events with duplicate field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-find-events-with-duplicate-field/m-p/188304#M37549</link>
      <description>&lt;P&gt;Did this work for you?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2015 04:47:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-find-events-with-duplicate-field/m-p/188304#M37549</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-07T04:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to find events with duplicate field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-find-events-with-duplicate-field/m-p/188305#M37550</link>
      <description>&lt;P&gt;In theory it should. I finally got a response back from our infrastructure team stating that either they need to make BrokenValue a multivalue field or I need to use the rex command as part of my query. I'll attempt the latter some time today. Thank you again for your suggestions! &lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2015 13:16:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-find-events-with-duplicate-field/m-p/188305#M37550</guid>
      <dc:creator>barrysvee</dc:creator>
      <dc:date>2015-07-07T13:16:22Z</dc:date>
    </item>
  </channel>
</rss>

