<?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 to get a field from a lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205379#M59716</link>
    <description>&lt;P&gt;Thanks MuS&lt;BR /&gt;
I think that is my missing piece.&lt;BR /&gt;
This is a Splunk cloud environment, can I make that change in the UI or do I need to pass a transforms.conf to the cloud team?&lt;/P&gt;</description>
    <pubDate>Fri, 05 Aug 2016 01:47:03 GMT</pubDate>
    <dc:creator>proylea</dc:creator>
    <dc:date>2016-08-05T01:47:03Z</dc:date>
    <item>
      <title>How to get a field from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205375#M59712</link>
      <description>&lt;P&gt;ok, here is my dilemma&lt;/P&gt;

&lt;P&gt;I have a lookup table like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_raw,sourcetype,alertMessage,severity
 *Reloading repositories*,liferay,Reloading repositories,high
 *RememberMe*,liferay,Remember Me,low
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;When I do a search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=pre_ces [|inputlookup pre-ces-alerts.csv | return 100 $_raw ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the correct number of results returned for the 2 strings in _raw in the lookup, so all good.&lt;/P&gt;

&lt;P&gt;Now I would like to apply the lookup field called alertMessages to the matching _raw events.&lt;/P&gt;

&lt;P&gt;I thought maybe something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=pre_ces [|inputlookup pre-ces-alerts.csv | return 100 $_raw ]| lookup update=true pre-ces-alerts.csv _raw OUTPUT alertMessage
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but it's doesn't create the field alertMessages&lt;/P&gt;

&lt;P&gt;If I select sourcetype as the lookup field like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=pre_ces [|inputlookup pre-ces-alerts.csv | return 100 $_raw ]| lookup update=true pre-ces-alerts.csv sourcetype OUTPUT alertMessage
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the alertMessage as an interesting field but both of the alertMessage strings get applied to every event because their sourcetype is the same.&lt;/P&gt;

&lt;P&gt;What I suspect is that because my _raw lookup string is not an exact match to the _raw event field (albeit a wild card match) it doesn't apply the alertMessage field.&lt;/P&gt;

&lt;P&gt;Can anyone tell me what I am missing here?&lt;/P&gt;

&lt;P&gt;Kind Regards&lt;BR /&gt;
Peter&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 05:15:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205375#M59712</guid>
      <dc:creator>proylea</dc:creator>
      <dc:date>2016-08-04T05:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a field from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205376#M59713</link>
      <description>&lt;P&gt;Think your missing the format command.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Format"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Format&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 08:29:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205376#M59713</guid>
      <dc:creator>teunlaan</dc:creator>
      <dc:date>2016-08-04T08:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a field from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205377#M59714</link>
      <description>&lt;P&gt;Thanks, but I have used the return command specifically because the format command was not returning the result correctly.&lt;/P&gt;

&lt;P&gt;I am getting the correct number of results returned I am just unable to apply the alertMessage field from the lookup to the corresponding _raw events&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 00:59:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205377#M59714</guid>
      <dc:creator>proylea</dc:creator>
      <dc:date>2016-08-05T00:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a field from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205378#M59715</link>
      <description>&lt;P&gt;Hi proylea,&lt;/P&gt;

&lt;P&gt;your using &lt;CODE&gt;*RememberMe*&lt;/CODE&gt; and another wild card field in the lookup; did you configure the lookup to use &lt;CODE&gt;match_type = WILDCARD(fieldname)&lt;/CODE&gt; in &lt;CODE&gt;transforms.conf&lt;/CODE&gt;? The default for lookups is &lt;CODE&gt;match_type = EXACT&lt;/CODE&gt; - see the docs for more details &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.2/Admin/Transformsconf"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.2/Admin/Transformsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 01:26:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205378#M59715</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2016-08-05T01:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a field from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205379#M59716</link>
      <description>&lt;P&gt;Thanks MuS&lt;BR /&gt;
I think that is my missing piece.&lt;BR /&gt;
This is a Splunk cloud environment, can I make that change in the UI or do I need to pass a transforms.conf to the cloud team?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 01:47:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205379#M59716</guid>
      <dc:creator>proylea</dc:creator>
      <dc:date>2016-08-05T01:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a field from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205380#M59717</link>
      <description>&lt;P&gt;No UI access to any &lt;CODE&gt;transforms.conf&lt;/CODE&gt; in cloud &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; So, you need to pass it to the cloud ops ...&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 02:04:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205380#M59717</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2016-08-05T02:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a field from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205381#M59718</link>
      <description>&lt;P&gt;Thanks MuS you're a legend&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 02:17:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205381#M59718</guid>
      <dc:creator>proylea</dc:creator>
      <dc:date>2016-08-05T02:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a field from a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205382#M59719</link>
      <description>&lt;P&gt;&lt;EM&gt;blush&lt;/EM&gt; thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 03:33:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-a-field-from-a-lookup/m-p/205382#M59719</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2016-08-05T03:33:11Z</dc:date>
    </item>
  </channel>
</rss>

