<?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: Lookup on Calculated field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78947#M19959</link>
    <description>&lt;P&gt;Agreed, edited my comment&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2013 12:10:31 GMT</pubDate>
    <dc:creator>linu1988</dc:creator>
    <dc:date>2013-06-28T12:10:31Z</dc:date>
    <item>
      <title>Lookup on Calculated field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78942#M19954</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
Is it possible to do lookup using a calculated field if yes then what is the procedure?&lt;BR /&gt;
i tried doing it but not working for me may be i am missing something.&lt;/P&gt;

&lt;P&gt;Thanks and Regards&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 09:29:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78942#M19954</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-06-28T09:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup on Calculated field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78943#M19955</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I'm going to assume your calculated field is using &lt;CODE&gt;stats&lt;/CODE&gt; or &lt;CODE&gt;eval&lt;/CODE&gt;? - For a better answer, tailored to your issue, it is always best to show the search being used (even if some values are omitted for security reasons).&lt;/P&gt;

&lt;P&gt;After you have your "calculated" fields, you may want to rename the fields to a simple format, e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.. | rename count(somefield) AS countSomeField
OR
.. | rename "Some Crazily Formatted_Field(!&amp;amp;$(" AS someField
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have had some issues with fields not looking up properly, but worked once I changed the name being used. As I said to help us help you, please paste in your search and the header row of the CSV file please.&lt;/P&gt;

&lt;P&gt;You can also check that Splunk has accepted your lookup configuration by running the following search (replacing the tag as to your needs):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup &amp;lt;yourLookupName&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;NOTE: The "&lt;CODE&gt;|&lt;/CODE&gt;" (pipe) should be the first character typed as this is a special search command.&lt;/P&gt;

&lt;P&gt;UPDATE: Based on your example...&lt;/P&gt;

&lt;P&gt;So to clarify, your CSV has the following header:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;pages,modulename
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And you wish to link the &lt;CODE&gt;pages&lt;/CODE&gt; field from your lookup to the extracted &lt;CODE&gt;module&lt;/CODE&gt; field from your search (as you detailed it as Linkingfield) ? If so try the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="hostname" 
| rex field=msg  "(GET:w+://[^)]+/(?&amp;lt;module&amp;gt;[^)]+.(xap|aspx))"
| lookup &amp;lt;yourLookupFile&amp;gt; page AS module OUTPUT modulename
| table _time host module modulename
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You should check out the documentation also... &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.3/Knowledge/Addfieldsfromexternaldatasources"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.3/Knowledge/Addfieldsfromexternaldatasources&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 10:40:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78943#M19955</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2013-06-28T10:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup on Calculated field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78944#M19956</link>
      <description>&lt;P&gt;search&lt;BR /&gt;
host="hostname" | rex field=msg  "(GET:\w+://[^)]+/(?&lt;MODULE&gt;[^)]+.(xap|aspx))"&lt;/MODULE&gt;&lt;/P&gt;

&lt;P&gt;i want to do lookup on module field extracted in rex&lt;/P&gt;

&lt;P&gt;fields in lookup file are &lt;BR /&gt;
pages(linkingfield) and modulename&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 10:50:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78944#M19956</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-06-28T10:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup on Calculated field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78945#M19957</link>
      <description>&lt;P&gt;Yes Chayya, it's possible. But you need to mention a common field data for both the lookup table and output data from query.&lt;/P&gt;

&lt;P&gt;Further you need to mention the lookup definition as |inputlookup will not work in the middle of the query. You will definitely get the output if the data matches the lookup table data, your case will workout very well.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 10:58:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78945#M19957</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-06-28T10:58:50Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup on Calculated field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78946#M19958</link>
      <description>&lt;P&gt;That's not entirely true, you can reference fields when doing the lookup, e.g. someField AS someOtherField.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 11:07:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78946#M19958</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2013-06-28T11:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup on Calculated field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78947#M19959</link>
      <description>&lt;P&gt;Agreed, edited my comment&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 12:10:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78947#M19959</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2013-06-28T12:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup on Calculated field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78948#M19960</link>
      <description>&lt;P&gt;That's cool.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2013 08:24:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78948#M19960</guid>
      <dc:creator>MHibbin</dc:creator>
      <dc:date>2013-07-01T08:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup on Calculated field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78949#M19961</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I want to restrict my regex to first match how can i do that?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2013 09:13:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-on-Calculated-field/m-p/78949#M19961</guid>
      <dc:creator>ChhayaV</dc:creator>
      <dc:date>2013-07-02T09:13:38Z</dc:date>
    </item>
  </channel>
</rss>

