<?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 How to filter events using lookup table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-lookup-table/m-p/508944#M142194</link>
    <description>&lt;P&gt;I've tried to follow others posts as well as the documentation here and I've come up empty. I have a bunch of device enrollment events in my index and I want to filter out only those events that are happening by users in our Pilot group listed in a lookup table.&lt;/P&gt;
&lt;P&gt;index data looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DeviceFriendlyName:  DeviceMobile-Serial1234
DeviceId:  132483 
EnrollmentEmailAddress: user@company.com
EnrollmentStatus:  Enrolled 
EnrollmentUserId:  123 
EnrollmentUserName:  mobileUsername
EventId:  148 
EventTime:  2020-07-13T22:54:04.4612316Z 
EventType:  MDM Enrollment Complete &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My lookup table is simply a list of:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;Full Name&lt;/TD&gt;
&lt;TD width="50%"&gt;E-mail Address&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to just see events where the EnrollmentEmailAddress matches an email listed in the "E-Mail Address" of the lookup table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=myindex source=mysource sourcetype=mysource_type EventId="148" | search [| inputlookup pilot_users.csv | rename "E-Mail Address" as EnrollmentEmailAddresss ] | table EnrollmentEmailAddress, EventId&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jul 2020 19:55:35 GMT</pubDate>
    <dc:creator>bvan</dc:creator>
    <dc:date>2020-07-14T19:55:35Z</dc:date>
    <item>
      <title>How to filter events using lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-lookup-table/m-p/508944#M142194</link>
      <description>&lt;P&gt;I've tried to follow others posts as well as the documentation here and I've come up empty. I have a bunch of device enrollment events in my index and I want to filter out only those events that are happening by users in our Pilot group listed in a lookup table.&lt;/P&gt;
&lt;P&gt;index data looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DeviceFriendlyName:  DeviceMobile-Serial1234
DeviceId:  132483 
EnrollmentEmailAddress: user@company.com
EnrollmentStatus:  Enrolled 
EnrollmentUserId:  123 
EnrollmentUserName:  mobileUsername
EventId:  148 
EventTime:  2020-07-13T22:54:04.4612316Z 
EventType:  MDM Enrollment Complete &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My lookup table is simply a list of:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;Full Name&lt;/TD&gt;
&lt;TD width="50%"&gt;E-mail Address&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to just see events where the EnrollmentEmailAddress matches an email listed in the "E-Mail Address" of the lookup table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=myindex source=mysource sourcetype=mysource_type EventId="148" | search [| inputlookup pilot_users.csv | rename "E-Mail Address" as EnrollmentEmailAddresss ] | table EnrollmentEmailAddress, EventId&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 19:55:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-lookup-table/m-p/508944#M142194</guid>
      <dc:creator>bvan</dc:creator>
      <dc:date>2020-07-14T19:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup table to filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-lookup-table/m-p/508946#M142195</link>
      <description>&lt;P&gt;You didn't say so, but I'll assume that query didn't work for you.&amp;nbsp; What did you get compared to what you wanted?&amp;nbsp; Have you tried something like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex source=mysource sourcetype=mysource_type EventId="148" [ | inputlookup pilot_users.csv | rename "E-Mail Address" as EnrollmentEmailAddresss | fields EnrollmentEmailAddresss | format ] 
| table EnrollmentEmailAddress, EventId&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's a pretty subtle change.&amp;nbsp; The inputlookup subsearch moves to before the first pipe so the list of email addresses can be filtered right away.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 12:41:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-lookup-table/m-p/508946#M142195</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-14T12:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup table to filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-lookup-table/m-p/508948#M142196</link>
      <description>&lt;P&gt;Unless you want both Full Name and E-mail address fields from the lookup to be used in the parent search, you need to add&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| table EnrollmentEmailAddress&lt;/LI-CODE&gt;&lt;P&gt;after the rename statement, before the end of the subsearch, as the outer search will also be using Full Name as a field search.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 00:42:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-lookup-table/m-p/508948#M142196</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-07-14T00:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup table to filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-lookup-table/m-p/509063#M142236</link>
      <description>&lt;P&gt;Good point, although it should be &lt;FONT face="courier new,courier"&gt;fields&lt;/FONT&gt; rather than &lt;FONT face="courier new,courier"&gt;table&lt;/FONT&gt;.&amp;nbsp; I've corrected my reply.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 12:40:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-lookup-table/m-p/509063#M142236</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-07-14T12:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup table to filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-lookup-table/m-p/509128#M142254</link>
      <description>&lt;P&gt;No luck. The job inspector says that it was able to find the lookup table successfully. I've verified the "E-Mail Address" column on that lookup table and I've run JUST a search filtering for EnrollmentEmailAdress=someemailinthattable@company.com and I got results. So the data is there, the query just isn't working.&lt;/P&gt;&lt;P&gt;I'm not sure what the next steps are. I might try to edit the lookup table and just rename the e-mail column so I don't have to do any re-naming inline in the search and hope that helps. Right now I'm getting no returned results using the helpful suggestions here.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 19:38:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-lookup-table/m-p/509128#M142254</guid>
      <dc:creator>bvan</dc:creator>
      <dc:date>2020-07-14T19:38:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using lookup table to filter events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-lookup-table/m-p/509130#M142255</link>
      <description>&lt;P&gt;Welp, it's always something. I just noticed EnrollmentEmailAddresss has too many s's in it. *facepalm*&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jul 2020 19:57:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-events-using-lookup-table/m-p/509130#M142255</guid>
      <dc:creator>bvan</dc:creator>
      <dc:date>2020-07-14T19:57:57Z</dc:date>
    </item>
  </channel>
</rss>

