<?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 compare two log files in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192523#M55361</link>
    <description>&lt;P&gt;Thank you for ur answer, just one more question which one i put as a lookup file and a data (index) ?&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jul 2015 09:28:18 GMT</pubDate>
    <dc:creator>isedrof</dc:creator>
    <dc:date>2015-07-07T09:28:18Z</dc:date>
    <item>
      <title>How to compare two log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192521#M55359</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;

&lt;P&gt;I'm working on two log files. The first one 'Collab.csv'  seems to be like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user_name       company    position
bob make        C1         Eng
Alice nelly     C2         Eng
Ashely gerard   C3         HR
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And the second one "logapp.csv" has this form:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user_name       user_id    application   sing_in_date   account_validity
bob make        bob.m      app1          10/06/2014     01/05/2015
Alice nelly     alice.n    app2          5/01/2015      01/05/2017
Ashely gerard   ashely.g   app3          07/04/2014     01/05/2016
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So the aim here is to retrieve all "users" that exists in the file "logapp.csv" that DO NOT exist in the first file "Collab.csv".&lt;BR /&gt;
What I have done before is put the first one as a lookup file, and the second one I uploaded via "Add data". I tried all combinations to get results after search, but I was not successful. I'm new to Splunk and I need your help please.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2015 08:51:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192521#M55359</guid>
      <dc:creator>isedrof</dc:creator>
      <dc:date>2015-07-07T08:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192522#M55360</link>
      <description>&lt;P&gt;Hi isedrof,&lt;/P&gt;

&lt;P&gt;a quick and dirty approach is this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup logapp.csv | search NOT [ search source=Collab.csv | dedup user_name | table user_name ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will read the log app.csv and searches for all user_names that are not returned by the sub search on the other cvs file.&lt;/P&gt;

&lt;P&gt;Hope that helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2015 09:11:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192522#M55360</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-07-07T09:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192523#M55361</link>
      <description>&lt;P&gt;Thank you for ur answer, just one more question which one i put as a lookup file and a data (index) ?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2015 09:28:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192523#M55361</guid>
      <dc:creator>isedrof</dc:creator>
      <dc:date>2015-07-07T09:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192524#M55362</link>
      <description>&lt;P&gt;Basically you could setup both cvs files as lookups and use them with &lt;CODE&gt;inputlookup&lt;/CODE&gt; or index both cvs files to some index and use this index in your search.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2015 09:41:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192524#M55362</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-07-07T09:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192525#M55363</link>
      <description>&lt;P&gt;i'm sorry to bother you with much questions but i'm new in splunk. so i'll say to you what i did until now.&lt;BR /&gt;
I added the first file "Collab.csv" into data (i guess this is what we call index in splunk language). after that i added the second file into Lookups (Lookups file and definition). and i'm trying now your approach by typing it on the search bar. it's correct what i have done until now ?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2015 09:46:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192525#M55363</guid>
      <dc:creator>isedrof</dc:creator>
      <dc:date>2015-07-07T09:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192526#M55364</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup logapp.csv | search NOT [ search index=* source=Collab.csv | dedup user_name | table user_name ]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Jul 2015 09:59:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192526#M55364</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-07-07T09:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192527#M55365</link>
      <description>&lt;P&gt;Thank your very much it works.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2015 10:43:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192527#M55365</guid>
      <dc:creator>isedrof</dc:creator>
      <dc:date>2015-07-07T10:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192528#M55366</link>
      <description>&lt;P&gt;Hey,&lt;BR /&gt;
Please, to make a filter on the "user_name" So that we extarct those that does not start with "WS" for example,  and filter "sing_in_date&amp;lt;08/07/2015 " .. how we can do that ?&lt;BR /&gt;
Thanks again.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 06:36:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192528#M55366</guid>
      <dc:creator>isedrof</dc:creator>
      <dc:date>2020-09-29T06:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192529#M55367</link>
      <description>&lt;P&gt;Regarding the &lt;CODE&gt;user_name&lt;/CODE&gt; simply but another &lt;CODE&gt;NOT user_name=ws*&lt;/CODE&gt; somewhere in the search pipe like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup logapp.csv | search NOT [ search index=* source=Collab.csv NOT user_name=WS* | dedup user_name | table user_name ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Regarding the &lt;CODE&gt;sign_in_date&lt;/CODE&gt; this is tricky, because you will need to transform it first into a date value so Splunk can use it an numeric value and not as string. Maybe this will do the trick?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | inputlookup logapp.csv | search NOT [ search index=* source=Collab.csv NOT user_name=WS* | dedup user_name | table user_name ] | eval sign_in_date=strptime(sign_in_date, "%m/%d/%Y") | search sing_in_date&amp;lt;08/07/2015
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is untested!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2015 19:57:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192529#M55367</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-07-08T19:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192530#M55368</link>
      <description>&lt;P&gt;Hey, &lt;BR /&gt;
If we want to search in 2 lookups files in the same time instead of searching in one file.&lt;BR /&gt;
thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2015 08:00:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192530#M55368</guid>
      <dc:creator>isedrof</dc:creator>
      <dc:date>2015-07-16T08:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare two log files</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192531#M55369</link>
      <description>&lt;P&gt;do it like this:&lt;BR /&gt;
    | inputlookup one | inputlookup append=t two | ...&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2015 22:53:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-two-log-files/m-p/192531#M55369</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-07-21T22:53:02Z</dc:date>
    </item>
  </channel>
</rss>

