<?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 How to edit my lookup search to display multiple fields after matching domains in a CSV file? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-lookup-search-to-display-multiple-fields-after/m-p/206889#M60274</link>
    <description>&lt;P&gt;Scenario:  I am matching dns queries to the domains listed in malware_domainsdm.csv.  The .csv has multiple fields that I want to display after it matches the dns query domain to the malware domains.&lt;/P&gt;

&lt;P&gt;Here is the search I am currently using, it displays the all .csv fields (column headers) but no values.   &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=DNSlogs | eval reformattedDomain = replace(replace(questionname,"\(\d+\)","."),"\.(.*)\.","\1")
| stats count by reformattedDomain 
| lookup malware_domainsdm.csv domain AS reformattedDomain  
| eval domainmatch=if(reformatedDomain==domain, "bad", "good")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please provide an example, thank you&lt;/P&gt;</description>
    <pubDate>Fri, 15 Apr 2016 18:57:52 GMT</pubDate>
    <dc:creator>packet_hunter</dc:creator>
    <dc:date>2016-04-15T18:57:52Z</dc:date>
    <item>
      <title>How to edit my lookup search to display multiple fields after matching domains in a CSV file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-lookup-search-to-display-multiple-fields-after/m-p/206889#M60274</link>
      <description>&lt;P&gt;Scenario:  I am matching dns queries to the domains listed in malware_domainsdm.csv.  The .csv has multiple fields that I want to display after it matches the dns query domain to the malware domains.&lt;/P&gt;

&lt;P&gt;Here is the search I am currently using, it displays the all .csv fields (column headers) but no values.   &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=DNSlogs | eval reformattedDomain = replace(replace(questionname,"\(\d+\)","."),"\.(.*)\.","\1")
| stats count by reformattedDomain 
| lookup malware_domainsdm.csv domain AS reformattedDomain  
| eval domainmatch=if(reformatedDomain==domain, "bad", "good")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please provide an example, thank you&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2016 18:57:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-lookup-search-to-display-multiple-fields-after/m-p/206889#M60274</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-04-15T18:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my lookup search to display multiple fields after matching domains in a CSV file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-lookup-search-to-display-multiple-fields-after/m-p/206890#M60275</link>
      <description>&lt;P&gt;You mean something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; |lookup malware_domainsdm.csv domain AS reformattedDomain  OUTPUT FieldX FieldY FieldZ
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Not quite what else you are asking for but the lookup command without OUTPUT should already output all fields by default.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Apr 2016 19:34:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-lookup-search-to-display-multiple-fields-after/m-p/206890#M60275</guid>
      <dc:creator>ryandg</dc:creator>
      <dc:date>2016-04-15T19:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my lookup search to display multiple fields after matching domains in a CSV file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-lookup-search-to-display-multiple-fields-after/m-p/206891#M60276</link>
      <description>&lt;P&gt;Hi Ryan,  you are correct with your answer and I apologize for the confusion on this question.  I did not properly test a matching condition.  When a matching condition occurs all fields populate.  Thank you for your help.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Apr 2016 01:43:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-lookup-search-to-display-multiple-fields-after/m-p/206891#M60276</guid>
      <dc:creator>packet_hunter</dc:creator>
      <dc:date>2016-04-16T01:43:08Z</dc:date>
    </item>
  </channel>
</rss>

