<?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 use the lookup table to find if I can retrieve the filename from my lookup in my log, using the source fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373326#M109798</link>
    <description>&lt;P&gt;Yes! Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2018 17:50:20 GMT</pubDate>
    <dc:creator>danje57</dc:creator>
    <dc:date>2018-02-12T17:50:20Z</dc:date>
    <item>
      <title>How to use the lookup table to find if I can retrieve the filename from my lookup in my log, using the source fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373319#M109791</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I need your help as I think I didn't use Lookup correctly.&lt;/P&gt;

&lt;P&gt;I've a field in my logs called source and which contain the complete path of a file.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/usr/home/logreader/20180212/2080212_CORP_all_AD_SUCESS_ACCESS.csv
/usr/home/logreader/20180212/2080212_CORP_all_AD_DENIED_ACCESS.csv
/usr/home/logreader/20180212/2080212_CORP_all_FW_SUCESS_ACCESS.csv
/usr/home/logreader/20180212/2080212_CORP_all_FW_DROP_ACCESS.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I created a Lookup named &lt;CODE&gt;CORP_script_source.csv&lt;/CODE&gt; which contain:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source
CORP_all_AD_SUCESS_ACCESS.csv
CORP_all_AD_DENIED_ACCESS.csv
CORP_all_FW_SUCESS_ACCESS.csv
CORP_all_FW_DROP_ACCESS.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to use the lookup table to find if I can retrieve the filename from my lookup in my log, using the source fields.&lt;/P&gt;

&lt;P&gt;the query should be, but I don't how to do it&lt;/P&gt;

&lt;P&gt;Indeed the query should make a match between the source field and the lookup. As I can't make an exact match&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=all_logs source="*CORP*" | dedup source | table source [|inputlookup CORP_script_source.csv source.... ] ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Do you have any ideas??&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 14:06:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373319#M109791</guid>
      <dc:creator>danje57</dc:creator>
      <dc:date>2018-02-12T14:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the lookup table to find if I can retrieve the filename from my lookup in my log, using the source fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373320#M109792</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=all_logs source="*CORP*" | dedup source|rex field=source ".*\/\d+_(?&amp;lt;source&amp;gt;.*)" |JOIN type=inner source [|inputlookup CORP_script_source.csv ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;it will join your index query with lookup by source field&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 14:24:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373320#M109792</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-12T14:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the lookup table to find if I can retrieve the filename from my lookup in my log, using the source fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373321#M109793</link>
      <description>&lt;P&gt;Thanks for your help,&lt;/P&gt;

&lt;P&gt;I tried your suggest however the resut is Not results found.&lt;/P&gt;

&lt;P&gt;Can I display a table to debug which give me:&lt;/P&gt;

&lt;P&gt;CORP_all_AD_SUCESS_ACCESS.csv FOUND&lt;BR /&gt;
CORP_all_AD_DENIED_ACCESS.csv NOT_FOUND&lt;BR /&gt;
CORP_all_FW_SUCESS_ACCESS.csv NOT_FOUND&lt;BR /&gt;
CORP_all_FW_DROP_ACCESS.csv FOUND&lt;/P&gt;

&lt;P&gt;?&lt;/P&gt;

&lt;P&gt;Your rex works fine as can display the table and it contains all sources which come from my logs.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:02:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373321#M109793</guid>
      <dc:creator>danje57</dc:creator>
      <dc:date>2020-09-29T18:02:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the lookup table to find if I can retrieve the filename from my lookup in my log, using the source fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373322#M109794</link>
      <description>&lt;P&gt;try updated query...if the source field is extracted correctly then it should join with lookup using source field &lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 14:48:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373322#M109794</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-12T14:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the lookup table to find if I can retrieve the filename from my lookup in my log, using the source fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373323#M109795</link>
      <description>&lt;P&gt;I done it but the result is the same...&lt;/P&gt;

&lt;P&gt;When I make the first part of the query:&lt;/P&gt;

&lt;P&gt;index=all_logs source="&lt;EM&gt;CORP&lt;/EM&gt;" |rex field=source ".&lt;EM&gt;\/\d+_(?.&lt;/EM&gt;)" | dedup source | table source&lt;/P&gt;

&lt;P&gt;I obtain this:&lt;BR /&gt;
CORP_all_AD_SUCESS_ACCESS.csv&lt;BR /&gt;
CORP_all_AD_DENIED_ACCESS.csv&lt;BR /&gt;
CORP_all_FW_SUCESS_ACCESS.csv&lt;BR /&gt;
CORP_all_FW_DROP_ACCESS.csv&lt;/P&gt;

&lt;P&gt;However, when I put the rest of the query:&lt;/P&gt;

&lt;P&gt;index=all_logs source="&lt;EM&gt;CORP&lt;/EM&gt;" | rex field=source ".&lt;EM&gt;\/\d+_(?.&lt;/EM&gt;)" | dedup source | table source |JOIN type=inner source [|inputlookup CORP_script_source.csv ]&lt;/P&gt;

&lt;P&gt;I don't have anything:&lt;BR /&gt;
Message: No results found.&lt;/P&gt;

&lt;P&gt;Do you think it's possible to have a table something like that:&lt;/P&gt;

&lt;P&gt;Filename Yes/No&lt;/P&gt;

&lt;P&gt;Depending if the filename from the log is found in the lookup.&lt;/P&gt;

&lt;P&gt;I'm a little bit lost with lookup &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:00:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373323#M109795</guid>
      <dc:creator>danje57</dc:creator>
      <dc:date>2020-09-29T18:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the lookup table to find if I can retrieve the filename from my lookup in my log, using the source fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373324#M109796</link>
      <description>&lt;P&gt;Just find it:&lt;/P&gt;

&lt;P&gt;I switched my splunk from linux to windows in this example so the rex is not the same i've adapted for windows path&lt;/P&gt;

&lt;P&gt;To find not present in the CSV&lt;/P&gt;

&lt;P&gt;index="tescsv" source="&lt;EM&gt;CORP&lt;/EM&gt;" |rex field=source ".&lt;EM&gt;\d+_(?.&lt;/EM&gt;)" | table source _time | search NOT [| inputlookup Corp_Source_Scripting.csv | table source]&lt;/P&gt;

&lt;P&gt;To find present in CSV&lt;/P&gt;

&lt;P&gt;index="tescsv" source="&lt;EM&gt;CORP&lt;/EM&gt;" |rex field=source ".&lt;EM&gt;\d+_(?.&lt;/EM&gt;)" | table source _time | search [| inputlookup Corp_Source_Scripting.csv | table source]&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:00:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373324#M109796</guid>
      <dc:creator>danje57</dc:creator>
      <dc:date>2020-09-29T18:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the lookup table to find if I can retrieve the filename from my lookup in my log, using the source fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373325#M109797</link>
      <description>&lt;P&gt;so is your issue resolved now?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 17:23:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373325#M109797</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-12T17:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the lookup table to find if I can retrieve the filename from my lookup in my log, using the source fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373326#M109798</link>
      <description>&lt;P&gt;Yes! Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 17:50:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-lookup-table-to-find-if-I-can-retrieve-the/m-p/373326#M109798</guid>
      <dc:creator>danje57</dc:creator>
      <dc:date>2018-02-12T17:50:20Z</dc:date>
    </item>
  </channel>
</rss>

