<?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 combine outputs from 2 different searches where fields match? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-outputs-from-2-different-searches-where-fields/m-p/322987#M163441</link>
    <description>&lt;P&gt;Nevermind, I was just being dumb. It seems no matter how I search by field3, field 2 doesn't exist.&lt;/P&gt;

&lt;P&gt;Thanks for the help though!&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jan 2018 16:30:52 GMT</pubDate>
    <dc:creator>auraria</dc:creator>
    <dc:date>2018-01-22T16:30:52Z</dc:date>
    <item>
      <title>How to combine outputs from 2 different searches where fields match?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-outputs-from-2-different-searches-where-fields/m-p/322984#M163438</link>
      <description>&lt;P&gt;EDIT: Nevermind, I was just being dumb. It seems no matter how I search by field3 value that triggered on field1, field 2 doesn't exist. For some reason I thought it did.&lt;/P&gt;

&lt;P&gt;I have an interesting issue I'm trying to solve and I've hit a road block at this point. &lt;/P&gt;

&lt;P&gt;Basically what I'm trying to accomplish is take the output of &lt;CODE&gt;search1&lt;/CODE&gt;, &lt;CODE&gt;append search2&lt;/CODE&gt;, and then match by both by &lt;CODE&gt;field 3&lt;/CODE&gt; since it exists in both searches.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;Search1&lt;/CODE&gt; and &lt;CODE&gt;search2&lt;/CODE&gt; have the same index, but produces mostly the same fields however there's a few that are not present on one search that the other has and vice versa. Let's call those &lt;CODE&gt;field1&lt;/CODE&gt; and &lt;CODE&gt;field2&lt;/CODE&gt;. EDIT: &lt;CODE&gt;Field 1&lt;/CODE&gt; only exists in &lt;CODE&gt;search1&lt;/CODE&gt; and &lt;CODE&gt;Field2&lt;/CODE&gt; only exists in &lt;CODE&gt;search2&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;This is my current query: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=s_index1  string field1="value" OR field1="value" OR string  field3!="value" | transaction field3  | append [search index=s_index1 string field2="*" | transaction field3] | transaction field3 | table  _time, field4, field5, field3, field6, field1, field2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is currently not working to the full effect I'd like, It seems most of the data is there but it's not correct/interpreting it correctly. &lt;/P&gt;

&lt;P&gt;I normally use eval to match the two separate fields with the same/or separate data is there a way to use eval in a way to match on searches? &lt;/P&gt;

&lt;P&gt;Such as &lt;CODE&gt;| eval search 1 field3=search 2 field 3&lt;/CODE&gt; or is there a way to do this that I'm simply missing? Should I be using the join command instead of append? Any help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 15:34:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-outputs-from-2-different-searches-where-fields/m-p/322984#M163438</guid>
      <dc:creator>auraria</dc:creator>
      <dc:date>2018-01-22T15:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine outputs from 2 different searches where fields match?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-outputs-from-2-different-searches-where-fields/m-p/322985#M163439</link>
      <description>&lt;P&gt;Hi auraria, &lt;/P&gt;

&lt;P&gt;would the following search work?&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;(index=s_index1 ((string AND field1="value") OR (field1="value") OR (string AND field3!="value"))  OR (search index=s_index1 AND string AND field2="") | transaction field3 | table _time, field4, field5, field3, field6, field1, field2&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 15:55:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-outputs-from-2-different-searches-where-fields/m-p/322985#M163439</guid>
      <dc:creator>horsefez</dc:creator>
      <dc:date>2018-01-22T15:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine outputs from 2 different searches where fields match?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-outputs-from-2-different-searches-where-fields/m-p/322986#M163440</link>
      <description>&lt;P&gt;I've tried this as well, in a slightly different way(basically removed extra parens). Still didn't get me the results I was interested in. &lt;/P&gt;

&lt;P&gt;I'm going to look at the data a bit more closely on boths sides to make sure I'm not missing something obvious.&lt;/P&gt;

&lt;P&gt;I'll continue to update the thread as I find out something new. &lt;BR /&gt;
Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 16:12:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-outputs-from-2-different-searches-where-fields/m-p/322986#M163440</guid>
      <dc:creator>auraria</dc:creator>
      <dc:date>2018-01-22T16:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine outputs from 2 different searches where fields match?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-outputs-from-2-different-searches-where-fields/m-p/322987#M163441</link>
      <description>&lt;P&gt;Nevermind, I was just being dumb. It seems no matter how I search by field3, field 2 doesn't exist.&lt;/P&gt;

&lt;P&gt;Thanks for the help though!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 16:30:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-outputs-from-2-different-searches-where-fields/m-p/322987#M163441</guid>
      <dc:creator>auraria</dc:creator>
      <dc:date>2018-01-22T16:30:52Z</dc:date>
    </item>
  </channel>
</rss>

