<?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 ignore some events at index time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-some-events-at-index-time/m-p/276282#M83325</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;
I have to index only events that contains the string "$$log$$".&lt;BR /&gt;
I try with a transforms like&lt;/P&gt;

&lt;P&gt;[ignore]&lt;BR /&gt;
REGEX = &amp;lt; a regex to match event not containing "$$log$$" &amp;gt;&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;How can I wrote a "not match" regex (like !~ in perl)?&lt;/P&gt;

&lt;P&gt;Thank's&lt;BR /&gt;
Christian&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2017 13:52:17 GMT</pubDate>
    <dc:creator>ktn01</dc:creator>
    <dc:date>2017-02-03T13:52:17Z</dc:date>
    <item>
      <title>How to ignore some events at index time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-some-events-at-index-time/m-p/276282#M83325</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
I have to index only events that contains the string "$$log$$".&lt;BR /&gt;
I try with a transforms like&lt;/P&gt;

&lt;P&gt;[ignore]&lt;BR /&gt;
REGEX = &amp;lt; a regex to match event not containing "$$log$$" &amp;gt;&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;How can I wrote a "not match" regex (like !~ in perl)?&lt;/P&gt;

&lt;P&gt;Thank's&lt;BR /&gt;
Christian&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 13:52:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-some-events-at-index-time/m-p/276282#M83325</guid>
      <dc:creator>ktn01</dc:creator>
      <dc:date>2017-02-03T13:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore some events at index time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-some-events-at-index-time/m-p/276283#M83326</link>
      <description>&lt;P&gt;Instead of using the 'not match' regex and drop those events, you do 'match' regex and index those matching events, and drop everything else. Something on the lines of&lt;/P&gt;

&lt;P&gt;In props.conf (keep the exact same order of transforms):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/var/log/messages]
TRANSFORMS-set= setnull,setparsing
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[setparsing]
REGEX = \$\$log\$\$
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See this for more details.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/Forwarding/Routeandfilterdatad#Keep_specific_events_and_discard_the_rest"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.2/Forwarding/Routeandfilterdatad#Keep_specific_events_and_discard_the_rest&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 14:53:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-some-events-at-index-time/m-p/276283#M83326</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-03T14:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to ignore some events at index time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-some-events-at-index-time/m-p/276284#M83327</link>
      <description>&lt;P&gt;Regex doesn't do NOT very well.  Your best bet is write a regex that matches want you want to keep and send everything else to nullQueue.  See the answer at &lt;A href="https://answers.splunk.com/answers/111362/filtering-of-events-using-nullqueue.html"&gt;https://answers.splunk.com/answers/111362/filtering-of-events-using-nullqueue.html&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 14:54:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-ignore-some-events-at-index-time/m-p/276284#M83327</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-02-03T14:54:27Z</dc:date>
    </item>
  </channel>
</rss>

