<?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: Search to find missing data using lookup table with multiple fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-to-find-missing-data-using-lookup-table-with-multiple/m-p/236623#M70298</link>
    <description>&lt;P&gt;When I run:&lt;/P&gt;

&lt;P&gt;| inputlookup netdevices_new | search NOT [search index=network | rex field=_raw "^(?:[^ \n]* ){4}(?P&amp;lt; c &amp;gt;[^ ]+)" | stats c by netdevice, ip | fields - c ]&lt;/P&gt;

&lt;P&gt;The output is all hosts in the lookup file.&lt;/P&gt;

&lt;P&gt;I think this is what you meant since the &amp;lt; c &amp;gt; after ?P was truncated.&lt;/P&gt;

&lt;P&gt;Thank you,&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 09:00:33 GMT</pubDate>
    <dc:creator>GersonGarcia</dc:creator>
    <dc:date>2020-09-29T09:00:33Z</dc:date>
    <item>
      <title>Search to find missing data using lookup table with multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-find-missing-data-using-lookup-table-with-multiple/m-p/236621#M70296</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to find missing data in Splunk from a lookup table using inputlookup. My lookup table is:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;netdevices_new&lt;/STRONG&gt;&lt;BR /&gt;
netdevice,ip,type&lt;BR /&gt;
host1,10.10.10.1,router&lt;BR /&gt;
host2,10.10.10.2,router&lt;BR /&gt;
host3,10.10.10.3,firewall&lt;BR /&gt;
host4,10.10.10.4,switch&lt;/P&gt;

&lt;P&gt;If I run these searches they work just fine:&lt;/P&gt;

&lt;P&gt;For &lt;STRONG&gt;hostnames&lt;/STRONG&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup netdevices_new | search NOT [search index=network | rex field=_raw "^(?:[^ \n]* ){4}(?P[^ ]+)" | dedup netdevice | fields netdevice ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For &lt;STRONG&gt;IPs&lt;/STRONG&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup netdevices_new | search NOT [search index=network | rex field=_raw "^(?:[^ \n]* ){4}(?P[^ ]+)" | dedup ip | fields ip ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I search for both netdevice and ip at the same time?&lt;/P&gt;

&lt;P&gt;The events in in the network index can have both hostname and ips.&lt;/P&gt;

&lt;P&gt;Thank you,&lt;/P&gt;

&lt;P&gt;Gerson Garcia&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 00:05:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-find-missing-data-using-lookup-table-with-multiple/m-p/236621#M70296</guid>
      <dc:creator>GersonGarcia</dc:creator>
      <dc:date>2016-03-09T00:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: Search to find missing data using lookup table with multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-find-missing-data-using-lookup-table-with-multiple/m-p/236622#M70297</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;P&gt;| inputlookup netdevices_new | search NOT [search index=network | rex field=_raw "^(?:[^ \n]* ){4}(?P[^ ]+)" | stats c by netdevice, ip | fields - c ]&lt;/P&gt;

&lt;P&gt;If you don't have both fields ip netdevice change your rex accordingly. Idea here is you need to pass both the field combination to search. &lt;/P&gt;

&lt;P&gt;If your lookup doesn't have all the possible combination you need to write another subsearch&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:01:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-find-missing-data-using-lookup-table-with-multiple/m-p/236622#M70297</guid>
      <dc:creator>vasanthmss</dc:creator>
      <dc:date>2020-09-29T09:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Search to find missing data using lookup table with multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-find-missing-data-using-lookup-table-with-multiple/m-p/236623#M70298</link>
      <description>&lt;P&gt;When I run:&lt;/P&gt;

&lt;P&gt;| inputlookup netdevices_new | search NOT [search index=network | rex field=_raw "^(?:[^ \n]* ){4}(?P&amp;lt; c &amp;gt;[^ ]+)" | stats c by netdevice, ip | fields - c ]&lt;/P&gt;

&lt;P&gt;The output is all hosts in the lookup file.&lt;/P&gt;

&lt;P&gt;I think this is what you meant since the &amp;lt; c &amp;gt; after ?P was truncated.&lt;/P&gt;

&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:00:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-find-missing-data-using-lookup-table-with-multiple/m-p/236623#M70298</guid>
      <dc:creator>GersonGarcia</dc:creator>
      <dc:date>2020-09-29T09:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Search to find missing data using lookup table with multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-to-find-missing-data-using-lookup-table-with-multiple/m-p/236624#M70299</link>
      <description>&lt;P&gt;HI&lt;BR /&gt;
try this search code&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup netdevices_new | search NOT [search index=network | rex field=_raw "^(?:[^ \n]* ){4}(?P[^ ]+)" |stats count by  ip netdevice| dedup ip netdevice | fields ip netdevice ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Mar 2016 08:07:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-to-find-missing-data-using-lookup-table-with-multiple/m-p/236624#M70299</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2016-03-09T08:07:39Z</dc:date>
    </item>
  </channel>
</rss>

