<?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 do I remove the lines with INFO or WARN from logging to Splunk? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-remove-the-lines-with-INFO-or-WARN-from-logging-to/m-p/413923#M73226</link>
    <description>&lt;P&gt;You can use the nullqueue for this purpose:&lt;/P&gt;

&lt;P&gt;You need a TRANSFORMS-removeINFO and TRANSFORMS-removeWARN in &lt;CODE&gt;props.conf&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[type1-logs]
TRANSFORMS-removeINFO = setnullinfo

[type2-logs]
TRANSFORMS-removeWARN = setnullwarn
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and in your &lt;CODE&gt;transforms.conf&lt;/CODE&gt; you need to set the &lt;CODE&gt;DEST_KEY&lt;/CODE&gt; to &lt;CODE&gt;queue&lt;/CODE&gt; and &lt;CODE&gt;FORMAT&lt;/CODE&gt; to &lt;CODE&gt;nullQueue&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnullinfo]
REGEX = INFO\w
DEST_KEY = queue
FORMAT = nullQueue

[setnullwarn]
REGEX = WARN\w
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Look out for more informations about routing and filtering data in the docs: &lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.4/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.4/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Mar 2019 16:46:14 GMT</pubDate>
    <dc:creator>damann</dc:creator>
    <dc:date>2019-03-04T16:46:14Z</dc:date>
    <item>
      <title>How do I remove the lines with INFO or WARN from logging to Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-remove-the-lines-with-INFO-or-WARN-from-logging-to/m-p/413921#M73224</link>
      <description>&lt;P&gt;I want to NOT ingest the events that have INFO or WARN in them.  Can I use the following in the Props.conf without anything in the transforms.conf?  And, of course will it work?&lt;/P&gt;

&lt;P&gt;[type1-logs]&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-removeINFO =s/INFO .+//g
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;[type2-logs]&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SEDCMD-removeWARN =s/WARN .+//g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Mar 2019 16:28:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-remove-the-lines-with-INFO-or-WARN-from-logging-to/m-p/413921#M73224</guid>
      <dc:creator>nls7010</dc:creator>
      <dc:date>2019-03-04T16:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove the lines with INFO or WARN from logging to Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-remove-the-lines-with-INFO-or-WARN-from-logging-to/m-p/413922#M73225</link>
      <description>&lt;P&gt;in transforms.conf you need something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[drop_info_warn]
 REGEX = (INFO|WARN)
 DEST_KEY = queue
 FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then in props.conf you need&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[type1-logs]
TRANSFORMS-drop = drop_info_warn

[type2-logs]
TRANSFORMS-drop = drop_info_warn
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am making the assumption that type1-logs, and type2-logs are &lt;STRONG&gt;two different&lt;/STRONG&gt; sourcetypes you wish to exclude these events from. If its only one type of log, then you only need to include one such stanza.&lt;/P&gt;

&lt;P&gt;To add some context to SEDCMD - this allows you to amend/replace text as the data is indexed, it won't allow you to 'drop' it. &lt;BR /&gt;
This means that you could mark all the INFO/WARN lines as blank, but you're still going to index them and:&lt;BR /&gt;
a.) This is almost certainly NOT what you want&lt;BR /&gt;
b.) You will still be paying to index them (licence usage/disk etc)&lt;/P&gt;

&lt;P&gt;By using props AND transforms, you prevent Splunk ever processing (indexing) events which contain these log levels, and I suspect this is what you really want.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 16:38:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-remove-the-lines-with-INFO-or-WARN-from-logging-to/m-p/413922#M73225</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-04T16:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I remove the lines with INFO or WARN from logging to Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-remove-the-lines-with-INFO-or-WARN-from-logging-to/m-p/413923#M73226</link>
      <description>&lt;P&gt;You can use the nullqueue for this purpose:&lt;/P&gt;

&lt;P&gt;You need a TRANSFORMS-removeINFO and TRANSFORMS-removeWARN in &lt;CODE&gt;props.conf&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[type1-logs]
TRANSFORMS-removeINFO = setnullinfo

[type2-logs]
TRANSFORMS-removeWARN = setnullwarn
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and in your &lt;CODE&gt;transforms.conf&lt;/CODE&gt; you need to set the &lt;CODE&gt;DEST_KEY&lt;/CODE&gt; to &lt;CODE&gt;queue&lt;/CODE&gt; and &lt;CODE&gt;FORMAT&lt;/CODE&gt; to &lt;CODE&gt;nullQueue&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnullinfo]
REGEX = INFO\w
DEST_KEY = queue
FORMAT = nullQueue

[setnullwarn]
REGEX = WARN\w
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Look out for more informations about routing and filtering data in the docs: &lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.4/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.4/Forwarding/Routeandfilterdatad#Filter_event_data_and_send_to_queues&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 16:46:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-remove-the-lines-with-INFO-or-WARN-from-logging-to/m-p/413923#M73226</guid>
      <dc:creator>damann</dc:creator>
      <dc:date>2019-03-04T16:46:14Z</dc:date>
    </item>
  </channel>
</rss>

