<?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 start conditional logging from Universal forwarder on Splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-conditional-logging-from-Universal-forwarder-on/m-p/248740#M74275</link>
    <description>&lt;P&gt;I have a server of which logs are indexed on splunk. The server is universal forwarder and sends a log file continuously to the Splunk to index. The logs have a lot of events with "INFO". I require that the events with "INFO" should be discarded and will not indexed by splunk.&lt;BR /&gt;
To attain the same i had made following changes on Indexer as my forwarder is universal forwarder. &lt;/P&gt;

&lt;P&gt;Path: /opt/splunk/etc/apps/search/local/props.conf&lt;BR /&gt;
[host::abcd.global.trafigura.com]&lt;BR /&gt;
sourcetype = abcd Log&lt;BR /&gt;
TRANSFORMS-null= setnull, setparsing&lt;/P&gt;

&lt;P&gt;Path: /opt/splunk/etc/apps/search/local/transforms.conf&lt;BR /&gt;
[setnull]&lt;BR /&gt;
REGEX = INFO&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[setparsing]&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = queue&lt;/P&gt;

&lt;H2&gt;FORMAT = indexQueue&lt;/H2&gt;

&lt;P&gt;But i'm not able to discard the events with INFO. Please help.&lt;/P&gt;</description>
    <pubDate>Tue, 15 Mar 2016 16:17:31 GMT</pubDate>
    <dc:creator>ayushchoudhary</dc:creator>
    <dc:date>2016-03-15T16:17:31Z</dc:date>
    <item>
      <title>How to start conditional logging from Universal forwarder on Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-conditional-logging-from-Universal-forwarder-on/m-p/248740#M74275</link>
      <description>&lt;P&gt;I have a server of which logs are indexed on splunk. The server is universal forwarder and sends a log file continuously to the Splunk to index. The logs have a lot of events with "INFO". I require that the events with "INFO" should be discarded and will not indexed by splunk.&lt;BR /&gt;
To attain the same i had made following changes on Indexer as my forwarder is universal forwarder. &lt;/P&gt;

&lt;P&gt;Path: /opt/splunk/etc/apps/search/local/props.conf&lt;BR /&gt;
[host::abcd.global.trafigura.com]&lt;BR /&gt;
sourcetype = abcd Log&lt;BR /&gt;
TRANSFORMS-null= setnull, setparsing&lt;/P&gt;

&lt;P&gt;Path: /opt/splunk/etc/apps/search/local/transforms.conf&lt;BR /&gt;
[setnull]&lt;BR /&gt;
REGEX = INFO&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[setparsing]&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = queue&lt;/P&gt;

&lt;H2&gt;FORMAT = indexQueue&lt;/H2&gt;

&lt;P&gt;But i'm not able to discard the events with INFO. Please help.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 16:17:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-conditional-logging-from-Universal-forwarder-on/m-p/248740#M74275</guid>
      <dc:creator>ayushchoudhary</dc:creator>
      <dc:date>2016-03-15T16:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to start conditional logging from Universal forwarder on Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-conditional-logging-from-Universal-forwarder-on/m-p/248741#M74276</link>
      <description>&lt;P&gt;Check if the host name is correct? IMO, the setparsing stanza is not required. Hope you restarted your indexer after making this change.&lt;BR /&gt;
Also, routing and filtering for structured data happens on UF itseft so can you confirm if your log data is structured or not. (see this &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad#Caveats_for_routing_and_filtering_structured_data"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Routeandfilterdatad#Caveats_for_routing_and_filtering_structured_data&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 18:44:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-conditional-logging-from-Universal-forwarder-on/m-p/248741#M74276</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-15T18:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to start conditional logging from Universal forwarder on Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-start-conditional-logging-from-Universal-forwarder-on/m-p/248742#M74277</link>
      <description>&lt;P&gt;Remove the setparsing part - that's for the opposite, "remove everything except the regex in the setparsing stanza". In your case, the dot matches everything so it keeps everything.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TRANSFORMS-null = setnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As a general advice, make sure your regex &lt;CODE&gt;INFO&lt;/CODE&gt; doesn't accidentally discard events that are of loglevel ERROR but happen to contain INFO somewhere else.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Mar 2016 22:07:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-start-conditional-logging-from-Universal-forwarder-on/m-p/248742#M74277</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2016-03-15T22:07:37Z</dc:date>
    </item>
  </channel>
</rss>

