<?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: managed lookup using inputlookup match in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-where-if-results-under-quot-query-quot/m-p/623138#M216633</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/139947"&gt;@YangThomas&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;in a subsearch you have to use the exact fieldnames of the main search, in other words i you want to match the hostname field (in the lookup) with the host field in the search, you have to rename it.&lt;/P&gt;&lt;P&gt;I don't understand what you want to match with the "query" field, also because query is a special name in SPL, anyway if query is a field both in the lookup and the main search, you could try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=opendns
[ | inputlookup hosts
| rename hostname AS host
| table host query]&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Sun, 04 Dec 2022 18:13:53 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2022-12-04T18:13:53Z</dc:date>
    <item>
      <title>How to create a search where if results under "query" field matches anything under hostname, then alert or show results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-where-if-results-under-quot-query-quot/m-p/623137#M216632</link>
      <description>&lt;P&gt;Currently using splunkes' managed lookup table called hosts. There's a field too called hostname within the file.&lt;BR /&gt;&lt;BR /&gt;I'm trying to create a search where if results under "query" field matches anything under hostname, then alert or show results.&lt;/P&gt;
&lt;P&gt;here's what I have so far..&lt;/P&gt;
&lt;P class="lia-align-left lia-indent-padding-left-60px"&gt; &lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=opendns
[ | inputlookup hosts
| search hostname
| table hostname query]&lt;/LI-CODE&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 12:39:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-where-if-results-under-quot-query-quot/m-p/623137#M216632</guid>
      <dc:creator>YangThomas</dc:creator>
      <dc:date>2022-12-05T12:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: managed lookup using inputlookup match</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-where-if-results-under-quot-query-quot/m-p/623138#M216633</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/139947"&gt;@YangThomas&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;in a subsearch you have to use the exact fieldnames of the main search, in other words i you want to match the hostname field (in the lookup) with the host field in the search, you have to rename it.&lt;/P&gt;&lt;P&gt;I don't understand what you want to match with the "query" field, also because query is a special name in SPL, anyway if query is a field both in the lookup and the main search, you could try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=opendns
[ | inputlookup hosts
| rename hostname AS host
| table host query]&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 18:13:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-where-if-results-under-quot-query-quot/m-p/623138#M216633</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-04T18:13:53Z</dc:date>
    </item>
  </channel>
</rss>

