<?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 lookup is not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/lookup-is-not-working/m-p/234889#M69764</link>
    <description>&lt;P&gt;I am doing it using GUI as i dont have server access.&lt;BR /&gt;
I have lookup file serverrole.csv&lt;BR /&gt;
host,role,environment&lt;BR /&gt;
A,X,prod&lt;/P&gt;

&lt;P&gt;Lookup file is located :/splunk/etc/apps/mysearch /lookups/serverroles.csv&lt;BR /&gt;
Lookup definition is created : serverrole_lookup in supported fields it shows : host,role,environment&lt;BR /&gt;
Automatic lookup : serverrole_lookup host AS host OUTPUT environment AS env host AS host role AS role for sourcetype: perfmon:processor&lt;/P&gt;

&lt;P&gt;When I do search as : |inputllookup serverrole.csv   it shows lookup file contents.&lt;/P&gt;

&lt;P&gt;But when I do search as : sourcetype=perfmon:processor | lookup serverroles.csv host,role OUTPUT host,role  I am not getting role, environment fields in "Intresting fields" or "Selected fields" or in "Events"..&lt;/P&gt;

&lt;P&gt;I want search to work if i search : sourcetype=perfmon:processor| where role=X &lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 11:18:19 GMT</pubDate>
    <dc:creator>shreyasathavale</dc:creator>
    <dc:date>2020-09-29T11:18:19Z</dc:date>
    <item>
      <title>lookup is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-is-not-working/m-p/234889#M69764</link>
      <description>&lt;P&gt;I am doing it using GUI as i dont have server access.&lt;BR /&gt;
I have lookup file serverrole.csv&lt;BR /&gt;
host,role,environment&lt;BR /&gt;
A,X,prod&lt;/P&gt;

&lt;P&gt;Lookup file is located :/splunk/etc/apps/mysearch /lookups/serverroles.csv&lt;BR /&gt;
Lookup definition is created : serverrole_lookup in supported fields it shows : host,role,environment&lt;BR /&gt;
Automatic lookup : serverrole_lookup host AS host OUTPUT environment AS env host AS host role AS role for sourcetype: perfmon:processor&lt;/P&gt;

&lt;P&gt;When I do search as : |inputllookup serverrole.csv   it shows lookup file contents.&lt;/P&gt;

&lt;P&gt;But when I do search as : sourcetype=perfmon:processor | lookup serverroles.csv host,role OUTPUT host,role  I am not getting role, environment fields in "Intresting fields" or "Selected fields" or in "Events"..&lt;/P&gt;

&lt;P&gt;I want search to work if i search : sourcetype=perfmon:processor| where role=X &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:18:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-is-not-working/m-p/234889#M69764</guid>
      <dc:creator>shreyasathavale</dc:creator>
      <dc:date>2020-09-29T11:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: lookup is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-is-not-working/m-p/234890#M69765</link>
      <description>&lt;P&gt;If your Lookup definition is "serverrole_lookup" then you should use as follows:&lt;BR /&gt;
*** base search | lookup serverrole_lookup host as host1 OUTPUT environment as env, role as myRole***&lt;/P&gt;

&lt;P&gt;where&lt;/P&gt;

&lt;P&gt;host field is in lookup table whereas host1 is an extracted field&lt;BR /&gt;
environment is in lookup table whereas env is random name you choose for field to show up as interesting field&lt;BR /&gt;
role is in lookup table whereas myRole is random name you choose for field to show up as interesting field&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;In case of automatic lookup defined (if done correctly) you can use the output fields (environment and role) directly like:&lt;BR /&gt;
*** base search | stats count by environment, role****&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:18:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-is-not-working/m-p/234890#M69765</guid>
      <dc:creator>govindsinghrawa</dc:creator>
      <dc:date>2020-09-29T11:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: lookup is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-is-not-working/m-p/234891#M69766</link>
      <description>&lt;P&gt;Thanks for reply..Using 1st I am getting results but  I am not able to see env and role in my fields.. Any thoughts?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 07:36:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-is-not-working/m-p/234891#M69766</guid>
      <dc:creator>shreyasathavale</dc:creator>
      <dc:date>2016-10-06T07:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: lookup is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-is-not-working/m-p/234892#M69767</link>
      <description>&lt;P&gt;interesting fields by default will come if they span 20%  event coverage.&lt;BR /&gt;
Click at All fields (just top right to Selected fields). which opens the field selector and checkbox the fields specifically as all fields should be present there.&lt;/P&gt;

&lt;P&gt;Up vote if u think it works. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 07:51:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-is-not-working/m-p/234892#M69767</guid>
      <dc:creator>govindsinghrawa</dc:creator>
      <dc:date>2016-10-06T07:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: lookup is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-is-not-working/m-p/234893#M69768</link>
      <description>&lt;P&gt;Done, but still unable to find them.. If they are not in events will they not show up??  How to add them in events?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 08:00:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-is-not-working/m-p/234893#M69768</guid>
      <dc:creator>shreyasathavale</dc:creator>
      <dc:date>2016-10-06T08:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: lookup is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/lookup-is-not-working/m-p/234894#M69769</link>
      <description>&lt;P&gt;Firstly if the events don't have the data u r looking for then why will the fields show up, as if it were to be then by that logic all the fields which are in "search x" should show up in "search y" as "search y" doesn't have any event from "search x" and yet is supposed to show them.&lt;/P&gt;

&lt;P&gt;In short no event data, so no fields for that data.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2016 08:12:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/lookup-is-not-working/m-p/234894#M69769</guid>
      <dc:creator>govindsinghrawa</dc:creator>
      <dc:date>2016-10-06T08:12:03Z</dc:date>
    </item>
  </channel>
</rss>

