<?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 How to combine a search result and an inputlookup file? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-a-search-result-and-an-inputlookup-file/m-p/346161#M102540</link>
    <description>&lt;P&gt;&lt;CODE&gt;*etc*&lt;/CODE&gt; = removed text for anonymity &lt;/P&gt;

&lt;P&gt;I have a very complex search query that input the following table:&lt;BR /&gt;
&lt;STRONG&gt;Network , Source_IP, count&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Search for this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="etc" index=*etc* EventCode=*etc* field46="*" | rex field=field46 "(?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:)(?\d+)\s+(?.*)" | dedup ip network | stats values(ip) as Source_IP dc(ip) as count by network   | sort count desc | table network count |  head 100
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to match  &lt;EM&gt;Network&lt;/EM&gt; with an inputlookup file column &lt;EM&gt;account&lt;/EM&gt;. Join/append? Not sure. The inputlookup file looks like this: &lt;BR /&gt;
&lt;STRONG&gt;Account, department, environment, primary, secondary&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;The final output needs to show the initial results with added columns = account, primary and secondary data from the inputlookup file. For those with no match, then it just need to show NULL in those 3 new columns. &lt;/P&gt;

&lt;P&gt;Final Output Sample: &lt;BR /&gt;
&lt;STRONG&gt;network, department, primary, secondary, source_IP, count&lt;/STRONG&gt; &lt;BR /&gt;
testuser , null, null, null, 10.10.10.10, 500 &lt;BR /&gt;
testuser1, team2, director1, director2 , 100.10.10.10, 10 &lt;BR /&gt;
testuser3, team4, director3, director4 , 100.10.10.10, 8 &lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2017 04:56:39 GMT</pubDate>
    <dc:creator>gingyish</dc:creator>
    <dc:date>2017-12-15T04:56:39Z</dc:date>
    <item>
      <title>How to combine a search result and an inputlookup file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-a-search-result-and-an-inputlookup-file/m-p/346161#M102540</link>
      <description>&lt;P&gt;&lt;CODE&gt;*etc*&lt;/CODE&gt; = removed text for anonymity &lt;/P&gt;

&lt;P&gt;I have a very complex search query that input the following table:&lt;BR /&gt;
&lt;STRONG&gt;Network , Source_IP, count&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Search for this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="etc" index=*etc* EventCode=*etc* field46="*" | rex field=field46 "(?\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:)(?\d+)\s+(?.*)" | dedup ip network | stats values(ip) as Source_IP dc(ip) as count by network   | sort count desc | table network count |  head 100
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to match  &lt;EM&gt;Network&lt;/EM&gt; with an inputlookup file column &lt;EM&gt;account&lt;/EM&gt;. Join/append? Not sure. The inputlookup file looks like this: &lt;BR /&gt;
&lt;STRONG&gt;Account, department, environment, primary, secondary&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;The final output needs to show the initial results with added columns = account, primary and secondary data from the inputlookup file. For those with no match, then it just need to show NULL in those 3 new columns. &lt;/P&gt;

&lt;P&gt;Final Output Sample: &lt;BR /&gt;
&lt;STRONG&gt;network, department, primary, secondary, source_IP, count&lt;/STRONG&gt; &lt;BR /&gt;
testuser , null, null, null, 10.10.10.10, 500 &lt;BR /&gt;
testuser1, team2, director1, director2 , 100.10.10.10, 10 &lt;BR /&gt;
testuser3, team4, director3, director4 , 100.10.10.10, 8 &lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 04:56:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-a-search-result-and-an-inputlookup-file/m-p/346161#M102540</guid>
      <dc:creator>gingyish</dc:creator>
      <dc:date>2017-12-15T04:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine a search result and an inputlookup file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-a-search-result-and-an-inputlookup-file/m-p/346162#M102541</link>
      <description>&lt;P&gt;The best way is to use the lookup and fillnull.&lt;BR /&gt;
 ... | table network count | lookup mynetwork network | fillnull value=null department, primary, secondary&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 18:37:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-a-search-result-and-an-inputlookup-file/m-p/346162#M102541</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2017-12-15T18:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to combine a search result and an inputlookup file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-combine-a-search-result-and-an-inputlookup-file/m-p/346163#M102542</link>
      <description>&lt;P&gt;and optionally make your lookup a CIDRMATCH one on the network field. &lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 18:37:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-combine-a-search-result-and-an-inputlookup-file/m-p/346163#M102542</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2017-12-15T18:37:48Z</dc:date>
    </item>
  </channel>
</rss>

