<?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 do I use a common field found in two sourcetypes to output a corresponding value from sourcetype2? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-common-field-found-in-two-sourcetypes-to-output-a/m-p/209555#M61281</link>
    <description>&lt;P&gt;This does not work.&lt;/P&gt;

&lt;P&gt;Let me clarify what I am trying to accomplish:&lt;/P&gt;

&lt;P&gt;I have two CSV documents and their column headers are as follows:&lt;/P&gt;

&lt;P&gt;sourcetype=threat&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;File Name,File Status,Symantec Score,Signature Status,AV Industry,Global Quarantined,Safelisted,Signed,Cert,Timestamp,Cert Issuer,Cert Publisher,Cert Subject,Product Name,Description,File Version,Company Name,Copyright,SHA256,MD5,Classification,DeviceName,Serial Number,File Size (bytes),File Path,Drive Type,File Owner,Create Time,Modification Time,Access Time,Running,Auto Run,Ever Run,First Found,Last Found,Detected By
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;sourcetype=device&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Device Name,Serial Number,OS Version,Agent Version,Policy,Zones,Mac Addresses,IP Addresses,Last Reported User,Background Detection,Created,Files Analyzed,Is Online,Online Date,Offline Date
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Basically what I want to do is merge the two searches together to create a table where anything found in sourcetype=threat will show the Zones information (found only in sourcetype=device) for the respective sourcetype=threat. &lt;/P&gt;

&lt;P&gt;Let me know if you follow what I am trying to achieve.  I can clarify further if necessary.&lt;/P&gt;

&lt;P&gt;Thank you so much for your help thus far! &lt;/P&gt;</description>
    <pubDate>Mon, 08 Aug 2016 19:08:51 GMT</pubDate>
    <dc:creator>Chrstover</dc:creator>
    <dc:date>2016-08-08T19:08:51Z</dc:date>
    <item>
      <title>How do I use a common field found in two sourcetypes to output a corresponding value from sourcetype2?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-common-field-found-in-two-sourcetypes-to-output-a/m-p/209553#M61279</link>
      <description>&lt;P&gt;I have two sources with different data in each except one common column in each sourcetype called "DeviceName".  In sourcetype two (device), I have a column called "Zones".  &lt;/P&gt;

&lt;P&gt;Is there a way of using "DeviceName" to print the "Zones" name from sourcetype two?&lt;/P&gt;

&lt;P&gt;My logic: Let's say DeviceName is "user-pc" and is in zone "Personal".  Search the second sourcetype by DeviceName (user-pc) and pull out the zone info and place it into the table.&lt;/P&gt;

&lt;P&gt;What I have so far is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=protect sourcetype=threat OR sourcetype=device 
    | dedup SHA256, "File Path", "File Name" 
    | table SHA256 "DeviceName" "File Status" "Classification" "Ever Run" "Auto Run" "Running" "File Path" "Zones"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Nothing is printed in the Zones column in the table however.  Any help would be appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 19:37:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-common-field-found-in-two-sourcetypes-to-output-a/m-p/209553#M61279</guid>
      <dc:creator>Chrstover</dc:creator>
      <dc:date>2016-08-02T19:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a common field found in two sourcetypes to output a corresponding value from sourcetype2?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-common-field-found-in-two-sourcetypes-to-output-a/m-p/209554#M61280</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=protect (sourcetype=threat OR sourcetype=device) | stats values(SHA256) as SHA256  values("File Status") as "File Status" values( "Classification") as Classification values("Ever Run") as "Ever Run" values("Auto Run") as "Auto Run" values("Running") as "Running" values("File Path") as "File Path" by Zones  DeviceName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Aug 2016 20:26:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-common-field-found-in-two-sourcetypes-to-output-a/m-p/209554#M61280</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-02T20:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a common field found in two sourcetypes to output a corresponding value from sourcetype2?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-common-field-found-in-two-sourcetypes-to-output-a/m-p/209555#M61281</link>
      <description>&lt;P&gt;This does not work.&lt;/P&gt;

&lt;P&gt;Let me clarify what I am trying to accomplish:&lt;/P&gt;

&lt;P&gt;I have two CSV documents and their column headers are as follows:&lt;/P&gt;

&lt;P&gt;sourcetype=threat&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;File Name,File Status,Symantec Score,Signature Status,AV Industry,Global Quarantined,Safelisted,Signed,Cert,Timestamp,Cert Issuer,Cert Publisher,Cert Subject,Product Name,Description,File Version,Company Name,Copyright,SHA256,MD5,Classification,DeviceName,Serial Number,File Size (bytes),File Path,Drive Type,File Owner,Create Time,Modification Time,Access Time,Running,Auto Run,Ever Run,First Found,Last Found,Detected By
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;sourcetype=device&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Device Name,Serial Number,OS Version,Agent Version,Policy,Zones,Mac Addresses,IP Addresses,Last Reported User,Background Detection,Created,Files Analyzed,Is Online,Online Date,Offline Date
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Basically what I want to do is merge the two searches together to create a table where anything found in sourcetype=threat will show the Zones information (found only in sourcetype=device) for the respective sourcetype=threat. &lt;/P&gt;

&lt;P&gt;Let me know if you follow what I am trying to achieve.  I can clarify further if necessary.&lt;/P&gt;

&lt;P&gt;Thank you so much for your help thus far! &lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 19:08:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-common-field-found-in-two-sourcetypes-to-output-a/m-p/209555#M61281</guid>
      <dc:creator>Chrstover</dc:creator>
      <dc:date>2016-08-08T19:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a common field found in two sourcetypes to output a corresponding value from sourcetype2?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-common-field-found-in-two-sourcetypes-to-output-a/m-p/209556#M61282</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=protect sourcetype=threat OR sourcetype=device 
| table SHA256 "DeviceName" "File Status" "Classification" "Ever Run" "Auto Run" "Running" "File Path" "Zones"
| stats values(*) as * by DeviceName
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=protect sourcetype=threat OR sourcetype=device 
    | table SHA256 "DeviceName" "File Status" "Classification" "Ever Run" "Auto Run" "Running" "File Path" "Zones"
    | stats list(*) as * by DeviceName | foreach * [eval "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;"=mvindex('&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;',-1)]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Aug 2016 19:23:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-common-field-found-in-two-sourcetypes-to-output-a/m-p/209556#M61282</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-08T19:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use a common field found in two sourcetypes to output a corresponding value from sourcetype2?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-common-field-found-in-two-sourcetypes-to-output-a/m-p/209557#M61283</link>
      <description>&lt;P&gt;While your search actually works it does not append the "Zones" information.&lt;/P&gt;

&lt;P&gt;So sourcetype=threat reports a threat and the only common column header is "DeviceName" and sourcetype=device is basically a list of all devices.  If a threat is detected I want the zones information to be put into the table.  &lt;/P&gt;

&lt;P&gt;So let's say Devicename=user-pc I need to search sourcetype=device find the zones information and append it to the table.  That way I know which department to go to in order to remedy the threat.  &lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2016 19:47:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-use-a-common-field-found-in-two-sourcetypes-to-output-a/m-p/209557#M61283</guid>
      <dc:creator>Chrstover</dc:creator>
      <dc:date>2016-08-08T19:47:48Z</dc:date>
    </item>
  </channel>
</rss>

