<?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: Question on how to use lookup file in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Question-on-how-to-use-lookup-file/m-p/469484#M132102</link>
    <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Search Here That Generates Exception_Name Exception_Keyword Comments columns
| lookup YourLookupHere.csv
| fillnull value="New" Comments
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 25 Oct 2019 07:43:23 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-10-25T07:43:23Z</dc:date>
    <item>
      <title>Question on how to use lookup file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-how-to-use-lookup-file/m-p/469483#M132101</link>
      <description>&lt;P&gt;I have a lookup file which has below 3 columns.&lt;/P&gt;

&lt;P&gt;Exception_Name Exception_Keyword Comments&lt;BR /&gt;
REXC RemoteException Alerted&lt;BR /&gt;
JNEXC Exception-NullPointer Ignorable&lt;/P&gt;

&lt;P&gt;Now in the logs when the Exception_Keyword occurs,It should look for the lookupfile and take the Exception_Name,Comments and give the result with host and count also.&lt;BR /&gt;
And if the Exception_Keyword does not exists in lookup it should be listed as New..&lt;/P&gt;

&lt;P&gt;Expected output as below :&lt;/P&gt;

&lt;P&gt;Exception Name Host Count Comments&lt;BR /&gt;
REXC ABC 27 Alerted&lt;BR /&gt;
javanull ABC 3 New&lt;/P&gt;

&lt;P&gt;Kindly help please.&lt;BR /&gt;
Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:45:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-how-to-use-lookup-file/m-p/469483#M132101</guid>
      <dc:creator>Deepz2612</dc:creator>
      <dc:date>2020-09-30T02:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: Question on how to use lookup file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-how-to-use-lookup-file/m-p/469484#M132102</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Search Here That Generates Exception_Name Exception_Keyword Comments columns
| lookup YourLookupHere.csv
| fillnull value="New" Comments
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 Oct 2019 07:43:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-how-to-use-lookup-file/m-p/469484#M132102</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-10-25T07:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Question on how to use lookup file</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Question-on-how-to-use-lookup-file/m-p/469485#M132103</link>
      <description>&lt;P&gt;Hi Deepz2612,&lt;BR /&gt;
it should be near your request:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=your_index
| rename _raw as rawText
| eval pattern=[ 
    | inputlookup exceptions.csv
    | stats values(Exception_Keyword) AS query
    | eval query=mvjoin(query,",")
    | fields query
    | format "" "" "" "" "" ""
    ]
| eval pattern=split(pattern,",")
| mvexpand pattern
| eval pattern="%".pattern."%"
| eval check=if(like(rawText,pattern),pattern,"No")
| rex field=pattern "\%(?&amp;lt;pattern&amp;gt;[^\%]*)\%"
| lookup exceptions.csv Exception_Keyword AS pattern OUTPUT Exception_Name Comments
| fillnull value="New" Comments
| stats values(Comments) AS Comments count BY Exception_Name host 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 10:11:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Question-on-how-to-use-lookup-file/m-p/469485#M132103</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-10-25T10:11:17Z</dc:date>
    </item>
  </channel>
</rss>

