<?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 do I table 3 distinct values within the same event if all values share the same field name? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-table-3-distinct-values-within-the-same-event-if-all/m-p/201793#M58482</link>
    <description>&lt;P&gt;Worked perfectly! &lt;/P&gt;

&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
    <pubDate>Thu, 14 Apr 2016 17:02:27 GMT</pubDate>
    <dc:creator>monteirolopes</dc:creator>
    <dc:date>2016-04-14T17:02:27Z</dc:date>
    <item>
      <title>How do I table 3 distinct values within the same event if all values share the same field name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-table-3-distinct-values-within-the-same-event-if-all/m-p/201789#M58478</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;In my log, I have the same name field for three distinct values in the same event. For example:&lt;/P&gt;

&lt;P&gt;...&lt;BR /&gt;
Security ID:&lt;STRONG&gt;Joseph&lt;/STRONG&gt;  Security ID:&lt;STRONG&gt;Admin&lt;/STRONG&gt;  Security ID:&lt;STRONG&gt;Lopes&lt;/STRONG&gt;&lt;BR /&gt;
..&lt;/P&gt;

&lt;P&gt;When I use the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | table Security_ID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk shows me:&lt;BR /&gt;
(2 events)&lt;/P&gt;

&lt;P&gt;Security ID&lt;/P&gt;

&lt;P&gt;Joseph&lt;BR /&gt;
Admin&lt;BR /&gt;
Lopes&lt;/P&gt;

&lt;P&gt;...&lt;/P&gt;

&lt;P&gt;John&lt;BR /&gt;
Felippe&lt;BR /&gt;
Brian&lt;/P&gt;

&lt;P&gt;How cCan I distinguish this information on three distinct fields in a search? I tried to create field extractions, but the log has a lot of data and my sample does not appear by entire.&lt;/P&gt;

&lt;P&gt;Security ID&lt;/P&gt;

&lt;P&gt;Joseph (field 1)&lt;BR /&gt;
Admin (field 2)&lt;BR /&gt;
Lopes (field 3)&lt;BR /&gt;
...&lt;/P&gt;

&lt;P&gt;John (field 1)&lt;BR /&gt;
Felippe (field 2)&lt;BR /&gt;
Brian (field 3)&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
Lopes.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 19:41:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-table-3-distinct-values-within-the-same-event-if-all/m-p/201789#M58478</guid>
      <dc:creator>monteirolopes</dc:creator>
      <dc:date>2016-04-13T19:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I table 3 distinct values within the same event if all values share the same field name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-table-3-distinct-values-within-the-same-event-if-all/m-p/201790#M58479</link>
      <description>&lt;P&gt;Here is a runanywhere example of how you can do this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval _raw="Security ID:Joseph Security ID:Admin Security ID:Lopes" | rex max_match=3 "ID:(?&amp;lt;id&amp;gt;\w+)" | nomv id | table id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you wan them as separate fields you could do this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval _raw="Security ID:Joseph Security ID:Admin Security ID:Lopes" | rex max_match=3 "ID:(?&amp;lt;id&amp;gt;\w+)" | eval f1=mvindex(id, 0) | eval f2=mvindex(id, 1) | eval f3=mvindex(id, 2) | table f1 f2 f3
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Apr 2016 20:21:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-table-3-distinct-values-within-the-same-event-if-all/m-p/201790#M58479</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-04-13T20:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I table 3 distinct values within the same event if all values share the same field name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-table-3-distinct-values-within-the-same-event-if-all/m-p/201791#M58480</link>
      <description>&lt;P&gt;Is there a generic way to do without writing the values ​​of the lines? I have a lot of event values ​​in the same search.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 12:43:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-table-3-distinct-values-within-the-same-event-if-all/m-p/201791#M58480</guid>
      <dc:creator>monteirolopes</dc:creator>
      <dc:date>2016-04-14T12:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I table 3 distinct values within the same event if all values share the same field name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-table-3-distinct-values-within-the-same-event-if-all/m-p/201792#M58481</link>
      <description>&lt;P&gt;Not sure I understand. This is is runanywhere example. When you use it, you will ignore everthing before the &lt;CODE&gt;rex&lt;/CODE&gt; command. The rex is a generic regular expression that will extract as long as the field name ends with "ID:" and the values are single word values. If there could be more than 3 fields, you can change the &lt;CODE&gt;max_match&lt;/CODE&gt; to whatever number you think you need. Setting &lt;CODE&gt;max_match&lt;/CODE&gt; to 0 will yield unlimited matches in a single event.&lt;/P&gt;

&lt;P&gt;As far as the &lt;CODE&gt;mvindex&lt;/CODE&gt; function is concerned, not sure there is a generic way to do that. &lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 15:49:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-table-3-distinct-values-within-the-same-event-if-all/m-p/201792#M58481</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-04-14T15:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I table 3 distinct values within the same event if all values share the same field name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-table-3-distinct-values-within-the-same-event-if-all/m-p/201793#M58482</link>
      <description>&lt;P&gt;Worked perfectly! &lt;/P&gt;

&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2016 17:02:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-table-3-distinct-values-within-the-same-event-if-all/m-p/201793#M58482</guid>
      <dc:creator>monteirolopes</dc:creator>
      <dc:date>2016-04-14T17:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I table 3 distinct values within the same event if all values share the same field name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-table-3-distinct-values-within-the-same-event-if-all/m-p/201794#M58483</link>
      <description>&lt;P&gt;Hi @monteirolopes&lt;/P&gt;

&lt;P&gt;Glad you were able to find a solution on Answers from @sundareshr &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Please don't forget to resolve the post by clicking "Accept" directly below his answer. This will make it easier to find for other users with a similar issue. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2016 23:45:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-table-3-distinct-values-within-the-same-event-if-all/m-p/201794#M58483</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2016-04-18T23:45:01Z</dc:date>
    </item>
  </channel>
</rss>

