<?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 which have a certain field which occurs more than once? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-events-which-have-a-certain-field-which-occurs-more/m-p/204859#M59521</link>
    <description>&lt;P&gt;The second one worked. The first one did not work, it would always report 0 or 1. I think because only the first occurrence of a field is recognized if you have MV_ADD set to false in the splunk config. Having the rex overcomes this.&lt;/P&gt;

&lt;P&gt;Thanks you!&lt;/P&gt;</description>
    <pubDate>Thu, 04 Aug 2016 19:20:14 GMT</pubDate>
    <dc:creator>jesabs</dc:creator>
    <dc:date>2016-08-04T19:20:14Z</dc:date>
    <item>
      <title>How to find events which have a certain field which occurs more than once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-events-which-have-a-certain-field-which-occurs-more/m-p/204857#M59519</link>
      <description>&lt;P&gt;I have some events which have a field which is named &lt;STRONG&gt;variable&lt;/STRONG&gt;. So the event will be like..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;field1="a" field2="b" variable="1" field3="d" variable="2" field4="f" variable="3"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sometimes the variable field shows up 0 times, sometimes 1 time, and sometimes multiple times in an event. I have been trying to come up with a search that can return only the events which have it multiple times.&lt;/P&gt;

&lt;P&gt;I do not care about the value of the variable field. I just want to find when the field is in an event more than once. Could anyone help me out?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 22:22:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-events-which-have-a-certain-field-which-occurs-more/m-p/204857#M59519</guid>
      <dc:creator>jesabs</dc:creator>
      <dc:date>2016-08-03T22:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to find events which have a certain field which occurs more than once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-events-which-have-a-certain-field-which-occurs-more/m-p/204858#M59520</link>
      <description>&lt;P&gt;If the name of the field will always be "variable", you could try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | where mvcount(variable)&amp;gt;1 | ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;IIf the field has not been extracted, try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex max_match=0 "variable=\"(?&amp;lt;variable&amp;gt;\d+)\"" |  where mvcount(variable)&amp;gt;1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Aug 2016 22:40:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-events-which-have-a-certain-field-which-occurs-more/m-p/204858#M59520</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-03T22:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to find events which have a certain field which occurs more than once?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-events-which-have-a-certain-field-which-occurs-more/m-p/204859#M59521</link>
      <description>&lt;P&gt;The second one worked. The first one did not work, it would always report 0 or 1. I think because only the first occurrence of a field is recognized if you have MV_ADD set to false in the splunk config. Having the rex overcomes this.&lt;/P&gt;

&lt;P&gt;Thanks you!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 19:20:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-events-which-have-a-certain-field-which-occurs-more/m-p/204859#M59521</guid>
      <dc:creator>jesabs</dc:creator>
      <dc:date>2016-08-04T19:20:14Z</dc:date>
    </item>
  </channel>
</rss>

