<?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 these two CSV files? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/584815#M203716</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901" target="_self"&gt;&lt;SPAN class=""&gt;yuanliu&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;, I appreciate your helpful Splunk query. It is 100% correct and fit my query. Thanks for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Rithekakan&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Feb 2022 23:21:26 GMT</pubDate>
    <dc:creator>Rithekakan</dc:creator>
    <dc:date>2022-02-11T23:21:26Z</dc:date>
    <item>
      <title>How to compare these two CSV files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/584559#M203640</link>
      <description>&lt;P&gt;I have reports Quarter1.csv and&amp;nbsp;Quarter2.csv.&lt;BR /&gt;after I upload these two&amp;nbsp; csv report I got&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;host="***" source="****"  sourcetype="***" and those fields  IP_Address,Plugin_Name,Severity,Protocol,Port,Exploit,Synopsis,Description,Solution,See_Also,CVSS_V2_Base_Score,CVE,Plugin.&lt;/LI-CODE&gt;
&lt;P&gt;I want 3 reports base on joining&amp;nbsp; with these 6 files:&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IP_Address, Plugin_Name, Severity, Protocol, Port, Exploit,
| table IP_Address,Plugin_Name,Severity,Protocol,Port,Exploit,Synopsis,Description,Solution,See_Also,CVSS_V2_Base_Score,CVE,Plugin, status&lt;/LI-CODE&gt;
&lt;P&gt;First report: - if the event are in&amp;nbsp; Quarter1.csv and&amp;nbsp;Quarter2.csv. show status as "Active Vulnerability"&lt;/P&gt;
&lt;P&gt;Second report:- if the event are in&amp;nbsp; Quarter1.csv but not in Quarter2.csv. show status as "Fixed"&lt;/P&gt;
&lt;P&gt;Third​ report:-&amp;nbsp;if the event are&amp;nbsp; not in&amp;nbsp; Quarter1.csv but there are&amp;nbsp; &amp;nbsp;in Quarter2.csv. show status as "New Active Vulnerability"&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 15:23:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/584559#M203640</guid>
      <dc:creator>Rithekakan</dc:creator>
      <dc:date>2022-02-14T15:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare these two CSV files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/584626#M203670</link>
      <description>&lt;P&gt;I assume that you ingested these files as events, not upload as CSV lookups, i.e., respective contents can be accessed with source=Quarter1.csv and source=Quarter2.csv. &amp;nbsp;You can do something like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fields IP_Address,Plugin_Name,Severity,Protocol,Port,Exploit,Synopsis,Description,Solution,See_Also,CVSS_V2_Base_Score,CVE,Plugin source
| stats values(*) as * by Plugin,IP_Address,Plugin_Name,Severity,Protocol,Port,Exploit
| eval status = case(mvcount(source)&amp;gt;1,"Active Vulnerability", source=="Quarter1.csv","Fixed", true(), "New Active Vulnerability")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 03:22:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/584626#M203670</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-02-11T03:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare these two CSV files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/584657#M203673</link>
      <description>&lt;P&gt;With two data sets to compare I prefer the "summing" approach.&lt;/P&gt;&lt;PRE&gt;sourcetype=A OR sourcetype=B&lt;BR /&gt;| eval picker=if(sourcetype="A",1,2)&lt;BR /&gt;| stats sum(picker) as picker by whatever fields you need&lt;BR /&gt;| eval status=case(picker=1,"only A",picker=2,"only B",picker=3,"both",1=1,"something wrong")&lt;/PRE&gt;&lt;P&gt;Yes, I know OP wanted three separate reports, but that's the general approach.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 07:25:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/584657#M203673</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-02-11T07:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare these two CSV files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/584815#M203716</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901" target="_self"&gt;&lt;SPAN class=""&gt;yuanliu&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;, I appreciate your helpful Splunk query. It is 100% correct and fit my query. Thanks for your help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Rithekakan&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 23:21:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/584815#M203716</guid>
      <dc:creator>Rithekakan</dc:creator>
      <dc:date>2022-02-11T23:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare these two CSV files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/585852#M204094</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;PickleRick, Thanks for your query, It help me for my report, but something is missing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want a report with these fields.&lt;BR /&gt;| table IP_Address, device, Plugin_Name, Severity, model, Protocol, Port, Exploit, Synopsis, Description, Solution, See_Also, CVSS_V2_Base_Score, CVE,Plugin &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;with join only 6 fields in the | stats sum " IP_Address,Plugin_Name,Plugin,Severity,Protocol,Port. "&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;| stats sum(picker) as.....&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;How eve if I add all 13 fields in the | stats sum(picker)as ..........It provide the uncorrected report becuse of some fields have duplicate data.&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Note: There are two even (device and model) are lookup from other Inventory CSV file.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could you pls help with this reequipment? I will be appreciate for your help.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ritheka Kan&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 04:51:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/585852#M204094</guid>
      <dc:creator>Rithekakan</dc:creator>
      <dc:date>2022-02-20T04:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare these two CSV files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/585853#M204095</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901" target="_self"&gt;&lt;SPAN class=""&gt;yuanliu&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;,&amp;nbsp;I 've reply to accept your query in the&amp;nbsp;previous time. It is 100%&amp;nbsp;&lt;/SPAN&gt;correct.&lt;BR /&gt;How ever the management needs two more fields (device, model) which it is lookup from the CVS inventory file.&lt;BR /&gt;and the report is something look like this.&lt;BR /&gt;| table IP_Address, device, Plugin_Name, Plugin, Severity, model, Protocol, Port, Exploit, Synopsis, Description, Solution, See_Also, CVSS_V2_Base_Score, CVE,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Could you pls help me&amp;nbsp; edit your query you've provided to&amp;nbsp; make it work with the lookup CSV file.&lt;/P&gt;&lt;P&gt;I have this lookup fils.&lt;BR /&gt;| lookup ABLNInventory.csv ip_address as IP_Address output device, model&lt;BR /&gt;| table IP_Address, device, Plugin_Name, Severity, model, Protocol, Port, Exploit, Synopsis, Description, Solution, See_Also, CVSS_V2_Base_Score, CVE, Plugin&lt;BR /&gt;&lt;BR /&gt;I will appreciate for your help.&lt;BR /&gt;Best regards,&lt;BR /&gt;Ritheka Kan&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 05:09:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/585853#M204095</guid>
      <dc:creator>Rithekakan</dc:creator>
      <dc:date>2022-02-20T05:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare these two CSV files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/585855#M204096</link>
      <description>&lt;P&gt;The way I see it, device and model are not used as criteria. &amp;nbsp;So, simply add it.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fields IP_Address,Plugin_Name,Severity,Protocol,Port,Exploit,Synopsis,Description,Solution,See_Also,CVSS_V2_Base_Score,CVE,Plugin source
| stats values(*) as * by Plugin,IP_Address,Plugin_Name,Severity,Protocol,Port,Exploit
| eval status = case(mvcount(source)&amp;gt;1,"Active Vulnerability", source=="Quarter1.csv","Fixed", true(), "New Active Vulnerability")
| lookup ABLNInventory.csv ip_address as IP_Address output device, model&lt;/LI-CODE&gt;&lt;P&gt;After this, you can arrange the table however you like.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Feb 2022 08:12:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/585855#M204096</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-02-20T08:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare these two CSV files?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/585932#M204116</link>
      <description>&lt;P&gt;Hi yuanliu,&lt;/P&gt;&lt;P&gt;I got it now. Thanks for your solution.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ritheka Kan&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 15:17:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-these-two-CSV-files/m-p/585932#M204116</guid>
      <dc:creator>Rithekakan</dc:creator>
      <dc:date>2022-02-21T15:17:13Z</dc:date>
    </item>
  </channel>
</rss>

