<?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: How to configure props.conf to remove any line NOT containing a certain string? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113465#M23759</link>
    <description>&lt;P&gt;settled to:&lt;/P&gt;

&lt;P&gt;[setnull]&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[setparsing]&lt;BR /&gt;
REGEX = pattern&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = indexQueue&lt;/P&gt;

&lt;P&gt;pretty much weitzman's answer.  Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 08 Sep 2014 13:29:12 GMT</pubDate>
    <dc:creator>essklau</dc:creator>
    <dc:date>2014-09-08T13:29:12Z</dc:date>
    <item>
      <title>How to configure props.conf to remove any line NOT containing a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113454#M23748</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;

&lt;P&gt;All I want is the props.conf equivalent of this delete action from sed:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;'/pattern/!d' 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That is it... just delete ANY line NOT containing "pattern".  &lt;/P&gt;

&lt;P&gt;Any takers?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 16:34:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113454#M23748</guid>
      <dc:creator>essklau</dc:creator>
      <dc:date>2014-09-05T16:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to remove any line NOT containing a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113455#M23749</link>
      <description>&lt;P&gt;When you say delete, you do not want to index such lines. Is that right?&lt;/P&gt;

&lt;P&gt;For this you need transforms.conf and props.conf&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 17:29:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113455#M23749</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-09-05T17:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to remove any line NOT containing a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113456#M23750</link>
      <description>&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[strip_pattern_lines]
REGEX = StringPattern
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your sourcetype]
TRANSFORMS-tonullqueue = strip_pattern_lines
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Dont forget to restart the splunk after making above changes.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[strip_pattern_lines]
REGEX = ^(?:[^ ]* ){4}(?!(PATTERN))
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
TRANSFORMS-tonullqueue = strip_pattern_lines
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Sep 2014 17:33:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113456#M23750</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-09-05T17:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to remove any line NOT containing a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113457#M23751</link>
      <description>&lt;P&gt;I don't believe that this works on multiline events.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 17:55:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113457#M23751</guid>
      <dc:creator>bmacias84</dc:creator>
      <dc:date>2014-09-05T17:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to remove any line NOT containing a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113458#M23752</link>
      <description>&lt;P&gt;I tried&lt;/P&gt;

&lt;P&gt;[strip_pattern_lines]&lt;BR /&gt;
REGEX = ^StringPattern&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;with no success yet.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:30:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113458#M23752</guid>
      <dc:creator>essklau</dc:creator>
      <dc:date>2020-09-28T17:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to remove any line NOT containing a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113459#M23753</link>
      <description>&lt;P&gt;Can you post your sample log lines which you want to send to null Queue&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 19:13:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113459#M23753</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-09-05T19:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to remove any line NOT containing a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113460#M23754</link>
      <description>&lt;P&gt;You can't use ^ as negation here. It's not a character class.&lt;/P&gt;

&lt;P&gt;It might be easier to write two transforms, one that discards everything and one that keeps the ones you want:&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
&lt;CODE&gt;[your sourcetype]&lt;BR /&gt;
TRANSFORMS-separate = discardall, keepsome&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Order is important here. &lt;CODE&gt;discardall&lt;/CODE&gt; comes first because all are applied in order, last one wins.&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
&lt;CODE&gt;[discardall]&lt;BR /&gt;
REGEX=.*&lt;BR /&gt;
DEST_KEY=queue&lt;BR /&gt;
FORMAT=nullQueue&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[keepsome]&lt;BR /&gt;
REGEX=StringPattern&lt;BR /&gt;
DEST_KEY=queue&lt;BR /&gt;
FORMAT=indexQueue&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 19:17:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113460#M23754</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-09-05T19:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to remove any line NOT containing a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113461#M23755</link>
      <description>&lt;P&gt;(Just an FYI - This probably won't work on multiline events either, as @bmacias84 points out.)&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 19:18:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113461#M23755</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-09-05T19:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to remove any line NOT containing a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113462#M23756</link>
      <description>&lt;P&gt;Agree. Thats why i have asked for sample log lines, so that we can suggest right configurations&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 19:24:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113462#M23756</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-09-05T19:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to remove any line NOT containing a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113463#M23757</link>
      <description>&lt;P&gt;Sure:&lt;/P&gt;

&lt;P&gt;2014-08-27 veryseriousinfo {zippity:boop.bop} hola23: PATTERN: Welcome to the jungle&lt;BR /&gt;
2014-08-27 abunchofsilliness {bangarang:yes:arang} flip11: The news in Uganda is grim&lt;BR /&gt;
2014-08-27 happygoluckyfool {drinkyourovaltine} lamp34: thisdoesnotmatter&lt;/P&gt;

&lt;P&gt;I only want to index the lines containing "PATTERN"&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 20:07:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113463#M23757</guid>
      <dc:creator>essklau</dc:creator>
      <dc:date>2014-09-05T20:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to remove any line NOT containing a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113464#M23758</link>
      <description>&lt;P&gt;I have edited my answer. Test regex once. I am not good at regex.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 20:20:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113464#M23758</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-09-05T20:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to remove any line NOT containing a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113465#M23759</link>
      <description>&lt;P&gt;settled to:&lt;/P&gt;

&lt;P&gt;[setnull]&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[setparsing]&lt;BR /&gt;
REGEX = pattern&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = indexQueue&lt;/P&gt;

&lt;P&gt;pretty much weitzman's answer.  Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Sep 2014 13:29:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113465#M23759</guid>
      <dc:creator>essklau</dc:creator>
      <dc:date>2014-09-08T13:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure props.conf to remove any line NOT containing a certain string?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113466#M23760</link>
      <description>&lt;P&gt;Based on your comment, I promoted my comment so you could mark it as your answer.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Sep 2014 13:37:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-configure-props-conf-to-remove-any-line-NOT-containing-a/m-p/113466#M23760</guid>
      <dc:creator>aweitzman</dc:creator>
      <dc:date>2014-09-08T13:37:47Z</dc:date>
    </item>
  </channel>
</rss>

