<?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 extract repeated field values in same event? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-repeated-field-values-in-same-event/m-p/573790#M199959</link>
    <description>Logs in one event are: user: user1 system: system1 user:user2 system: system2 output should look like below: output1 output2 system1 system2</description>
    <pubDate>Fri, 05 Nov 2021 11:17:19 GMT</pubDate>
    <dc:creator>rajs115</dc:creator>
    <dc:date>2021-11-05T11:17:19Z</dc:date>
    <item>
      <title>How to extract repeated field values in same event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-repeated-field-values-in-same-event/m-p/573789#M199958</link>
      <description>Hi Guys, I am new to splunk. I need to run a query to extract the system name value which is repeated twice in the same log event. Logs in one event are: user: user1 system: system1 user:user2 system: system2 output should look like below: output1 output2 system1 system2 cheers.</description>
      <pubDate>Fri, 05 Nov 2021 11:08:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-repeated-field-values-in-same-event/m-p/573789#M199958</guid>
      <dc:creator>rajs115</dc:creator>
      <dc:date>2021-11-05T11:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract repeated field values in same event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-repeated-field-values-in-same-event/m-p/573790#M199959</link>
      <description>Logs in one event are: user: user1 system: system1 user:user2 system: system2 output should look like below: output1 output2 system1 system2</description>
      <pubDate>Fri, 05 Nov 2021 11:17:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-repeated-field-values-in-same-event/m-p/573790#M199959</guid>
      <dc:creator>rajs115</dc:creator>
      <dc:date>2021-11-05T11:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract repeated field values in same event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-repeated-field-values-in-same-event/m-p/573801#M199964</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex max_match=2 "system:\s(?&amp;lt;system&amp;gt;[\S]+)"
| eval system1=mvindex(system,0)
| eval system2=mvindex(system,1)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 Nov 2021 11:46:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-repeated-field-values-in-same-event/m-p/573801#M199964</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-05T11:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract repeated field values in same event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-repeated-field-values-in-same-event/m-p/573805#M199966</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Logs in one event are: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;user: user1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;system: system1 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;user:user2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;system: system2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;output should look like below: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;output1&amp;nbsp; &amp;nbsp; &amp;nbsp; output2 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;system1&amp;nbsp; &amp;nbsp; &amp;nbsp;system2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried as you suggested. Not returning any values.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 12:03:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-repeated-field-values-in-same-event/m-p/573805#M199966</guid>
      <dc:creator>rajs115</dc:creator>
      <dc:date>2021-11-05T12:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract repeated field values in same event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-repeated-field-values-in-same-event/m-p/573818#M199968</link>
      <description>&lt;P&gt;Can you share the raw events in a code block &amp;lt;/&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 12:52:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-repeated-field-values-in-same-event/m-p/573818#M199968</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-11-05T12:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract repeated field values in same event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-repeated-field-values-in-same-event/m-p/573819#M199969</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Its working now. Made a slight change from your command. Not sure it its appropriate or not. is there any way we can compare these two values&amp;nbsp; or same or not (if system1=system2)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex max_match=2 "system:\s(?&amp;lt;system&amp;gt;[\S]+)"
| eval system1=mvindex(system,-1)
| eval system2=mvindex(system,0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Nov 2021 12:55:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-repeated-field-values-in-same-event/m-p/573819#M199969</guid>
      <dc:creator>rajs115</dc:creator>
      <dc:date>2021-11-05T12:55:21Z</dc:date>
    </item>
  </channel>
</rss>

