<?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: Back ground exclusion in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29995#M6073</link>
    <description>&lt;P&gt;I posted as you can see it needs quite a bit of piping&lt;/P&gt;</description>
    <pubDate>Fri, 09 Aug 2013 17:44:19 GMT</pubDate>
    <dc:creator>cpeteman</dc:creator>
    <dc:date>2013-08-09T17:44:19Z</dc:date>
    <item>
      <title>Back ground exclusion</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29991#M6069</link>
      <description>&lt;P&gt;So I have search and I would like to exclude all of those results from some future searches. Aside from specifying some by NOT, which given the length of the first search would be questionable at best. Is there a way to make this exclusion in the backgrounmd not in search? &lt;/P&gt;

&lt;P&gt;Here is the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search terms  | eval TimeInHour=_time%3600 
| rex mode=sed "s/ \d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}//g" 
| stats first(_raw) by punct,TimeInHour,_raw,_time 
|  stats count by _raw,TimeInHour,punct 
|  addinfo| eval hours = round((info_max_time - info_min_time)/3600,0) 
| where count &amp;gt; hours-1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Aug 2013 22:02:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29991#M6069</guid>
      <dc:creator>cpeteman</dc:creator>
      <dc:date>2013-08-08T22:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground exclusion</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29992#M6070</link>
      <description>&lt;P&gt;Updated: &lt;/P&gt;

&lt;P&gt;In this case, you'll want to use a macros and that will allow you to reference the macro and simplify the look of the search and if you ever need to use it in an adhoc fashion you'll just need to remember the macro.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/Search/Usesearchmacros"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/Search/Usesearchmacros&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 12:58:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29992#M6070</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2013-08-09T12:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground exclusion</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29993#M6071</link>
      <description>&lt;P&gt;So I tried creating an event type but the search I have is too complicated and gives me:&lt;/P&gt;

&lt;P&gt;" Message: Eventtype search string cannot be a search pipeline or contain a subsearch"&lt;/P&gt;

&lt;P&gt;Want me to post the full search?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 17:15:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29993#M6071</guid>
      <dc:creator>cpeteman</dc:creator>
      <dc:date>2013-08-09T17:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground exclusion</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29994#M6072</link>
      <description>&lt;P&gt;Lets see the search and what you are trying to simplify.  Eventtype will be for anything narrowing down search without and pipes like sourcetype='x' AND error NOT failure NOT critical NOT down.   A macros can make use of pipes however.  Depends on what you are trying to achieve.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.4/Search/Usesearchmacros"&gt;http://docs.splunk.com/Documentation/Splunk/5.0.4/Search/Usesearchmacros&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 17:37:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29994#M6072</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2013-08-09T17:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground exclusion</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29995#M6073</link>
      <description>&lt;P&gt;I posted as you can see it needs quite a bit of piping&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 17:44:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29995#M6073</guid>
      <dc:creator>cpeteman</dc:creator>
      <dc:date>2013-08-09T17:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground exclusion</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29996#M6074</link>
      <description>&lt;P&gt;Updated above.  You can use the SED command at index time and mask or delete data as well.  However, that would affect all future searches of that data.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 17:52:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29996#M6074</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2013-08-09T17:52:15Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground exclusion</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29997#M6075</link>
      <description>&lt;P&gt;So I got the marco running as hourly when I search:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;hourly&lt;/CODE&gt; I get the results I would expect&lt;/P&gt;

&lt;P&gt;However excluding&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;search terms NOT&lt;/CODE&gt;hourly``&lt;/P&gt;

&lt;P&gt;gives no results which is not what I expected or want.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 17:59:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29997#M6075</guid>
      <dc:creator>cpeteman</dc:creator>
      <dc:date>2013-08-09T17:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground exclusion</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29998#M6076</link>
      <description>&lt;P&gt;You can't use a macro in that way with NOT.  However you write the macro the intent should be that it filters out what you don't want to see.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 18:04:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29998#M6076</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2013-08-09T18:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground exclusion</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29999#M6077</link>
      <description>&lt;P&gt;Ah ok,,,,,&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 18:05:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/29999#M6077</guid>
      <dc:creator>cpeteman</dc:creator>
      <dc:date>2013-08-09T18:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground exclusion</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/30000#M6078</link>
      <description>&lt;P&gt;Having trouble, based on the posted search do you know how I would make the filter macro?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 18:28:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/30000#M6078</guid>
      <dc:creator>cpeteman</dc:creator>
      <dc:date>2013-08-09T18:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground exclusion</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/30001#M6079</link>
      <description>&lt;P&gt;I made a new question as a follow up, but I've not forgotten this one. if it gets answered and it turns out that macro's are the way to go I'll mark this as the right answers &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2013 20:44:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Back-ground-exclusion/m-p/30001#M6079</guid>
      <dc:creator>cpeteman</dc:creator>
      <dc:date>2013-08-09T20:44:39Z</dc:date>
    </item>
  </channel>
</rss>

