<?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 REX and Lookups in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/REX-and-Lookups/m-p/337882#M100202</link>
    <description>&lt;P&gt;I am trying to use a lookup table after I rex out some logs. &lt;/P&gt;

&lt;P&gt;Here is an example:&lt;BR /&gt;
index=* source=messages&lt;BR /&gt;
| rex field=_raw "ACTION:[\w]\s(?.*) CODE"&lt;BR /&gt;
| outputlookup actions.csv action OUTPUT desc AS desc&lt;BR /&gt;
| table _time action desc&lt;/P&gt;

&lt;P&gt;Can anyone help? Am I doing it wrong? &lt;/P&gt;</description>
    <pubDate>Mon, 16 Apr 2018 18:30:56 GMT</pubDate>
    <dc:creator>HealyManTech</dc:creator>
    <dc:date>2018-04-16T18:30:56Z</dc:date>
    <item>
      <title>REX and Lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REX-and-Lookups/m-p/337882#M100202</link>
      <description>&lt;P&gt;I am trying to use a lookup table after I rex out some logs. &lt;/P&gt;

&lt;P&gt;Here is an example:&lt;BR /&gt;
index=* source=messages&lt;BR /&gt;
| rex field=_raw "ACTION:[\w]\s(?.*) CODE"&lt;BR /&gt;
| outputlookup actions.csv action OUTPUT desc AS desc&lt;BR /&gt;
| table _time action desc&lt;/P&gt;

&lt;P&gt;Can anyone help? Am I doing it wrong? &lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 18:30:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REX-and-Lookups/m-p/337882#M100202</guid>
      <dc:creator>HealyManTech</dc:creator>
      <dc:date>2018-04-16T18:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: REX and Lookups</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REX-and-Lookups/m-p/337883#M100203</link>
      <description>&lt;P&gt;I think the display is eating some of your rex, so I'm not sure I can troubleshoot that part directly. If it's working at creating a field called &lt;CODE&gt;action&lt;/CODE&gt;, then you should only need to revise your lookup line:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| lookup actions.csv action OUTPUT desc AS desc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will work if the events contain a field called &lt;CODE&gt;action&lt;/CODE&gt;. If they don't, (say, maybe they contain a field called &lt;CODE&gt;ACTION&lt;/CODE&gt;), then you'd do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| lookup actions.csv action AS ACTION OUTPUT desc AS desc
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The way you have it now, you are using the command &lt;CODE&gt;outputlookup&lt;/CODE&gt;, which is used to literally "output a lookup file" (i.e. create a lookup file) rather than to &lt;EM&gt;use&lt;/EM&gt; a lookup file to perform a lookup. &lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 18:36:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REX-and-Lookups/m-p/337883#M100203</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-04-16T18:36:58Z</dc:date>
    </item>
  </channel>
</rss>

