<?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: InputLookup search query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499370#M139075</link>
    <description>&lt;P&gt;Check the results line by line.&lt;BR /&gt;
I can't see your situation.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Dec 2019 11:35:18 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2019-12-02T11:35:18Z</dc:date>
    <item>
      <title>InputLookup search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499362#M139067</link>
      <description>&lt;P&gt;Hello everyone!&lt;/P&gt;

&lt;P&gt;My initial search give me events with the URLs that users clicked using the outlook client.  After a bit of REGEX magic, I have extracted the URL from the event which looks something like "&lt;A href="http://www.Jon.com"&gt;www.Jon.com&lt;/A&gt;". I have a CSV file called "URLDatabase" that has very similar content as the text-box below. What I want is to check whether the identified URL "&lt;A href="http://www.Jon.com"&gt;www.Jon.com&lt;/A&gt;" is in among the CSV under the url column and if it is to extract/return the full url from the CSV file.&lt;/P&gt;

&lt;P&gt;My problem is that the search command after the inputlookup "search= url=web" doesnt treat web as variable but just as word. If I do "search url="&lt;EM&gt;&lt;A href="http://www.Jon.com"&gt;www.Jon.com&lt;/A&gt;&lt;/EM&gt;*" it works but I want it to accept a field such as web so it can be dynamic.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;CSV file structure (Not using all columns)&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;pid,url,verdict,process
5654,www.Jon.com/name/dsd.html,Pass,first
5745,www.Michael.com/name/dsdf.html,Fail,first
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;SPLUNK command&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="WinEventLog:Microsoft-Windows-Sysmon/Operational"  ParentImage:("DATA") Image:("DATA2" OR "DATA3") | rex field=ParentImage "^.*\d(?&amp;lt;website&amp;gt;.*)\.*" |  eval web="\"*".(website)."*\"" | eval foo=[| inputlookup URLDatabase.csv | search url=web | return url | format ] | fields User App Product foo | bucket_time span=20m | stats values(User) as Users values(App) as Application values(Product) as Browser values(foo) as URLs by _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have tried multiple ways to make url=web to work but all failed as it is not accepting is a dynamic field/variable"&lt;/P&gt;

&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Nov 2019 17:34:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499362#M139067</guid>
      <dc:creator>dyrm1</dc:creator>
      <dc:date>2019-11-29T17:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: InputLookup search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499363#M139068</link>
      <description>&lt;P&gt;You cannot search between fields by searching.&lt;/P&gt;

&lt;P&gt;in this case&lt;BR /&gt;
It will be &lt;CODE&gt;search url = "web"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;therefore,&lt;BR /&gt;
&lt;CODE&gt;search url=web&lt;/CODE&gt;&lt;BR /&gt;
⇨ &lt;CODE&gt;where url=web&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;But your SPL is too problematic.&lt;/P&gt;

&lt;P&gt;It's better to show the log.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2019 00:01:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499363#M139068</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-01T00:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: InputLookup search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499364#M139069</link>
      <description>&lt;P&gt;Hello to4kawa&lt;/P&gt;

&lt;P&gt;I have tried "where" already but didnt work.&lt;/P&gt;

&lt;P&gt;I think the problem is that the query "url=web" happens within "[....]" and therefore is not aware that the web field/variable exists.&lt;/P&gt;

&lt;P&gt;any ideas on how to overcome this? &lt;/P&gt;

&lt;P&gt;You also mentioned that my SPL is too problematic, can you please elaborate?&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2019 00:13:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499364#M139069</guid>
      <dc:creator>dyrm1</dc:creator>
      <dc:date>2019-12-01T00:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: InputLookup search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499365#M139070</link>
      <description>&lt;PRE&gt;&lt;CODE&gt; source="WinEventLog:Microsoft-Windows-Sysmon/Operational"  ParentImage:("DATA") Image:("DATA2" OR "DATA3") 
| rex field=ParentImage "^.*\d(?&amp;lt;website&amp;gt;.*)\.*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;At this point,&lt;BR /&gt;
Please tell me some values ​​of &lt;EM&gt;website&lt;/EM&gt; and &lt;EM&gt;url&lt;/EM&gt; .&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval url="www.Jon.com/name/dsd.html#www.John.com/name/dsd.html#www.Michael.com/name/dsdf.html#*Jon*#*Michael*"
| makemv delim="#" url
| mvexpand url
`comment("check table status")`
| join url [| makeresults
| eval _raw="pid,url,verdict,process
5654,www.Jon.com/name/dsd.html,Pass,first
5745,www.Michael.com/name/dsdf.html,Fail,first"
| multikv forceheader=1
    | table pid,url,verdict,process]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From this result, you can see that the current query does not work properly.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2019 00:23:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499365#M139070</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-01T00:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: InputLookup search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499366#M139071</link>
      <description>&lt;P&gt;The values would be the following:&lt;/P&gt;

&lt;P&gt;url = &lt;A href="http://www.Jon.com/name/dsd.html"&gt;www.Jon.com/name/dsd.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;website = &lt;A href="http://www.Jon.com"&gt;www.Jon.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;the "url" exists within the CSV file and the "website" is extracted from a sysmon event. So basically I want to check if the extracted value (website) exists in the CSV file under the url column and if it does to capture it. &lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2019 00:37:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499366#M139071</guid>
      <dc:creator>dyrm1</dc:creator>
      <dc:date>2019-12-01T00:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: InputLookup search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499367#M139072</link>
      <description>&lt;PRE&gt;&lt;CODE&gt; source="WinEventLog:Microsoft-Windows-Sysmon/Operational"  ParentImage:("DATA") Image:("DATA2" OR "DATA3") 
| rex field=ParentImage "^.*\d(?&amp;lt;website&amp;gt;.*)\.*" 
| join website [|inputlookup URLDatabase.csv 
| rex field=url "(?&amp;lt;website&amp;gt;[^/]+)"
| table website, url]
| fields User App Product url 
| bucket_time span=20m 
| stats values(*) as * by _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How about it?&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2019 00:57:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499367#M139072</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-01T00:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: InputLookup search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499368#M139073</link>
      <description>&lt;P&gt;Hello to4kawa,&lt;/P&gt;

&lt;P&gt;Unfortunately it didn't work &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2019 21:02:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499368#M139073</guid>
      <dc:creator>dyrm1</dc:creator>
      <dc:date>2019-12-01T21:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: InputLookup search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499369#M139074</link>
      <description>&lt;P&gt;That is the difference between &lt;CODE&gt;search&lt;/CODE&gt; and &lt;CODE&gt;where&lt;/CODE&gt;.  Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | where url==web
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 01 Dec 2019 22:24:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499369#M139074</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-12-01T22:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: InputLookup search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499370#M139075</link>
      <description>&lt;P&gt;Check the results line by line.&lt;BR /&gt;
I can't see your situation.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 11:35:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/InputLookup-search-query/m-p/499370#M139075</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-02T11:35:18Z</dc:date>
    </item>
  </channel>
</rss>

