<?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: Idenitfying Common Value between Two Indexes and Exporting Results with a Mix of Fields in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Idenitfying-Common-Value-between-Two-Indexes-and-Exporting/m-p/492652#M84217</link>
    <description>&lt;P&gt;Timestamps should not be a factor in this query as the events from each index are joined by IP, not time, and the first timestamp found is the one displayed in the table.  Can you share some (sanitized) output?&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2019 11:32:24 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2019-10-09T11:32:24Z</dc:date>
    <item>
      <title>Idenitfying Common Value between Two Indexes and Exporting Results with a Mix of Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Idenitfying-Common-Value-between-Two-Indexes-and-Exporting/m-p/492649#M84214</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;Apologies for the long winded title! I'm struggling to extract a common value from two indexes and get out any meaningful data. I have two products on our network that both include the IP address of a user's device. I would like to match the IP address in two seperate events and combine them into one result. The tricky part is that the timestamps are not idenitcal. An example:&lt;/P&gt;

&lt;P&gt;Index=Red (Timestamp 11:00am)&lt;BR /&gt;
userName=Bob Jones, userIP=192.168.2.12, userPass=true&lt;/P&gt;

&lt;P&gt;Index=Blue (Timestamp 11:02:04)&lt;BR /&gt;
NAME:bob.jones,IPADD:192.168.2.12,EventID:4682672&lt;/P&gt;

&lt;P&gt;...&lt;/P&gt;

&lt;P&gt;I would like the result to be formatted something like this:&lt;/P&gt;

&lt;P&gt;Time   Name   IP   EventID userPass&lt;/P&gt;

&lt;P&gt;...&lt;/P&gt;

&lt;P&gt;I'd be grateful if anybody could point me in the right direction. I have an ok-to-good understanding of RegEx but I've tried creating a common field and it never works as expected. &lt;/P&gt;

&lt;P&gt;Thank you for any help you can provide! &lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2019 14:44:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Idenitfying-Common-Value-between-Two-Indexes-and-Exporting/m-p/492649#M84214</guid>
      <dc:creator>danfinan</dc:creator>
      <dc:date>2019-10-03T14:44:47Z</dc:date>
    </item>
    <item>
      <title>Re: Idenitfying Common Value between Two Indexes and Exporting Results with a Mix of Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Idenitfying-Common-Value-between-Two-Indexes-and-Exporting/m-p/492650#M84215</link>
      <description>&lt;P&gt;Since the two timestamps are different, you'll have to choose one of them to display.  I'll choose the Red time.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=Red OR index=Blue | eval IP=coalesce(userIP, IPADD) 
| stats first(_time) as Time, values(userName) as Name, values(EventID) as EventID, values(userPass) as userPass by IP 
| table Time Name IP EventID userPass
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Oct 2019 16:55:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Idenitfying-Common-Value-between-Two-Indexes-and-Exporting/m-p/492650#M84215</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-10-03T16:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Idenitfying Common Value between Two Indexes and Exporting Results with a Mix of Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Idenitfying-Common-Value-between-Two-Indexes-and-Exporting/m-p/492651#M84216</link>
      <description>&lt;P&gt;Hi richgalloway, thanks for taking the time to help with this - very kind of you! Your solution got me a little closer to what I am trying to achieve. The 'coalesce' input created the common fields that I needed, thank you.&lt;/P&gt;

&lt;P&gt;The table created has the correct layout however the events from the two indexes do not make it to the same row - likely because the timestamps may be off - in your experience, is there a way to combat this? Let's say for example that the event from index=red was at 11:04:09 and the event in index=blue happened 11:05:01. Can that still be paired? Failing that, can the timestamp for a single index be ignored? &lt;/P&gt;

&lt;P&gt;If I'm asking something completely out of the scope of this question, please don't worry about it. Thank you for getting me close to my target though! &lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 10:00:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Idenitfying-Common-Value-between-Two-Indexes-and-Exporting/m-p/492651#M84216</guid>
      <dc:creator>danfinan</dc:creator>
      <dc:date>2019-10-09T10:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Idenitfying Common Value between Two Indexes and Exporting Results with a Mix of Fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Idenitfying-Common-Value-between-Two-Indexes-and-Exporting/m-p/492652#M84217</link>
      <description>&lt;P&gt;Timestamps should not be a factor in this query as the events from each index are joined by IP, not time, and the first timestamp found is the one displayed in the table.  Can you share some (sanitized) output?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 11:32:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Idenitfying-Common-Value-between-Two-Indexes-and-Exporting/m-p/492652#M84217</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-10-09T11:32:24Z</dc:date>
    </item>
  </channel>
</rss>

