<?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: Joining two logs by two common fields and output the values as a table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-logs-by-two-common-fields-and-output-the-values-as-a/m-p/153430#M43051</link>
    <description>&lt;P&gt;Thank you for your help.  &lt;/P&gt;

&lt;P&gt;I was curious what to do when the second search does not have a common field to join on and ommitting those results.&lt;/P&gt;

&lt;P&gt;So I specifically want to output when there is an actual join with both fields for the two searches.  &lt;/P&gt;

&lt;P&gt;Again appreciate the help.&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jun 2015 17:20:12 GMT</pubDate>
    <dc:creator>rajadatta</dc:creator>
    <dc:date>2015-06-12T17:20:12Z</dc:date>
    <item>
      <title>Joining two logs by two common fields and output the values as a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-logs-by-two-common-fields-and-output-the-values-as-a/m-p/153428#M43049</link>
      <description>&lt;P&gt;Hi - I would like to join two logs and get specific result as table.  I want to join by two common fields.  Been working on getting this all day and need help.&lt;/P&gt;

&lt;P&gt;so I have log 1 as below and want these values in a table&lt;/P&gt;

&lt;P&gt;index="atti" sourcetype="strongmail" source="/data1/strongmail/log/strongmail-device-category.log" | &lt;STRONG&gt;table DateStamp UserId &lt;BR /&gt;
mailingid ttype DeviceInfo&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I have log 2 &lt;BR /&gt;
index="atti" sourcetype="strongmail" source="/data1/strongmail/log/strongmail-success.log" &lt;/P&gt;

&lt;P&gt;The common fields I want to join by &lt;STRONG&gt;mailingid,UserId.&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;In this second log, I want to only return the field &lt;STRONG&gt;EMAIL&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;In the end I need including the first logs output and second logs output in a table&lt;/P&gt;

&lt;P&gt;So looking for this &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;DateStamp UserId EMAIL mailingid ttype DeviceInfo&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Thanks for any help, if more info is needed, I will gladly input them in this forum&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2015 01:20:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-logs-by-two-common-fields-and-output-the-values-as-a/m-p/153428#M43049</guid>
      <dc:creator>rajadatta</dc:creator>
      <dc:date>2015-06-11T01:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Joining two logs by two common fields and output the values as a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-logs-by-two-common-fields-and-output-the-values-as-a/m-p/153429#M43050</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(index="atti" sourcetype="strongmail" source="/data1/strongmail/log/strongmail-device-category.log") OR (index="atti" sourcetype="strongmail" source="/data1/strongmail/log/strongmail-success.log") | stats values(*) AS * BY mailingid,UserId | table DateStamp UserId EMAIL mailingid ttype DeviceInfo
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 Jun 2015 03:08:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-logs-by-two-common-fields-and-output-the-values-as-a/m-p/153429#M43050</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-11T03:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Joining two logs by two common fields and output the values as a table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-logs-by-two-common-fields-and-output-the-values-as-a/m-p/153430#M43051</link>
      <description>&lt;P&gt;Thank you for your help.  &lt;/P&gt;

&lt;P&gt;I was curious what to do when the second search does not have a common field to join on and ommitting those results.&lt;/P&gt;

&lt;P&gt;So I specifically want to output when there is an actual join with both fields for the two searches.  &lt;/P&gt;

&lt;P&gt;Again appreciate the help.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2015 17:20:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-logs-by-two-common-fields-and-output-the-values-as-a/m-p/153430#M43051</guid>
      <dc:creator>rajadatta</dc:creator>
      <dc:date>2015-06-12T17:20:12Z</dc:date>
    </item>
  </channel>
</rss>

