<?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: What is the most efficient way to filter search results by list? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-filter-search-results-by-list/m-p/165245#M46952</link>
    <description>&lt;P&gt;You're probably looking for tags: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.2/Knowledge/Abouttagsandaliases"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.2/Knowledge/Abouttagsandaliases&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You'd define a tag &lt;CODE&gt;monitoredDevice&lt;/CODE&gt; and configure your list of &lt;CODE&gt;UniqueId&lt;/CODE&gt; values for that tag. Then you can search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo tag=monitoredDevice
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Great to reuse in other searches and to be maintained in one location.&lt;/P&gt;

&lt;P&gt;Under the hood Splunk will resolve that to the long list of &lt;CODE&gt;OR&lt;/CODE&gt;'d values, giving you the best search performance.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Aug 2014 22:23:11 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-08-01T22:23:11Z</dc:date>
    <item>
      <title>What is the most efficient way to filter search results by list?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-filter-search-results-by-list/m-p/165241#M46948</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am looking to filter my search results by the 'UniqueID' field so that I only get results from the devices that I want to monitor.  &lt;/P&gt;

&lt;P&gt;I believe there are two ways to do this:  &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Search like this (make it an event type for easier reading): &lt;CODE&gt;index=index1 (UniqueId=1 OR UniqueId=2 OR UniqueId=3 OR UniqueId=4)&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Create a lookup table and use input lookup.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Does anyone know if there is a 3rd option?  Or if one is more efficient than the other?  &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 13:14:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-filter-search-results-by-list/m-p/165241#M46948</guid>
      <dc:creator>AlexMcDuffMille</dc:creator>
      <dc:date>2014-07-31T13:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to filter search results by list?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-filter-search-results-by-list/m-p/165242#M46949</link>
      <description>&lt;P&gt;In your second option, you're talking about filtering entries at base search level only using inputlookup right?&lt;/P&gt;

&lt;P&gt;Means like this--&lt;/P&gt;

&lt;P&gt;index=index1 [|inputlookup uniqueIds.csv | table UniqueId] ...| rest of the search&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 13:29:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-filter-search-results-by-list/m-p/165242#M46949</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-07-31T13:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to filter search results by list?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-filter-search-results-by-list/m-p/165243#M46950</link>
      <description>&lt;P&gt;Correct.  I have not yet implemented it, but I believe that is the general gist of how to do it.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 13:30:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-filter-search-results-by-list/m-p/165243#M46950</guid>
      <dc:creator>AlexMcDuffMille</dc:creator>
      <dc:date>2014-07-31T13:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to filter search results by list?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-filter-search-results-by-list/m-p/165244#M46951</link>
      <description>&lt;P&gt;I don't think there is a better approach then these two. Best place for filter is in the main search pipeline. Among these two options, first one will be little faster(I guess) as no sub searches, but may will become complex to write/read as the no of UniqueIds will increase. I would go with option two as its configurable.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jul 2014 18:42:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-filter-search-results-by-list/m-p/165244#M46951</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-07-31T18:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to filter search results by list?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-filter-search-results-by-list/m-p/165245#M46952</link>
      <description>&lt;P&gt;You're probably looking for tags: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.2/Knowledge/Abouttagsandaliases"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.2/Knowledge/Abouttagsandaliases&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You'd define a tag &lt;CODE&gt;monitoredDevice&lt;/CODE&gt; and configure your list of &lt;CODE&gt;UniqueId&lt;/CODE&gt; values for that tag. Then you can search like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo tag=monitoredDevice
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Great to reuse in other searches and to be maintained in one location.&lt;/P&gt;

&lt;P&gt;Under the hood Splunk will resolve that to the long list of &lt;CODE&gt;OR&lt;/CODE&gt;'d values, giving you the best search performance.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2014 22:23:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-filter-search-results-by-list/m-p/165245#M46952</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-08-01T22:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: What is the most efficient way to filter search results by list?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-filter-search-results-by-list/m-p/165246#M46953</link>
      <description>&lt;P&gt;Eventtypes would work here as well, but in my mind you're not actually defining a type of event but rather grouping a set of &lt;CODE&gt;UniqueId&lt;/CODE&gt; values for any type of event they may produce. Performance would be the same.&lt;BR /&gt;
Additionally, tags let you add/remove/edit values individually while an eventtype only lets you edit a massive string. Adding or removing &lt;CODE&gt;UniqueId&lt;/CODE&gt; values should be much less error-prone with tags.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2014 22:24:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-most-efficient-way-to-filter-search-results-by-list/m-p/165246#M46953</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-08-01T22:24:51Z</dc:date>
    </item>
  </channel>
</rss>

