<?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 blacklist a specific string from a log file in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-blacklist-a-specific-string-from-a-log-file/m-p/296505#M56209</link>
    <description>&lt;P&gt;above query did not save the actual entries. please find the correct one tested below.&lt;/P&gt;

&lt;P&gt;blacklist = vol-UPC.log$|cg.log$&lt;BR /&gt;
blacklist = UPC.log$|cg.log$&lt;BR /&gt;
blacklist = /UPC.log$|cg.log$&lt;/P&gt;</description>
    <pubDate>Tue, 22 Aug 2017 03:40:54 GMT</pubDate>
    <dc:creator>sunilpapaiah</dc:creator>
    <dc:date>2017-08-22T03:40:54Z</dc:date>
    <item>
      <title>How to blacklist a specific string from a log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-blacklist-a-specific-string-from-a-log-file/m-p/296504#M56208</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a log files under /export/logs/directory &lt;/P&gt;

&lt;P&gt;/export/logs/vol-ext-test-ind-UPC-input.log&lt;/P&gt;

&lt;P&gt;I tried below option to blacklist the files which has "UPC" string in the log file but no luck. can some one advice on it.&lt;/P&gt;

&lt;P&gt;blacklist = Rf-UPC.log$|cg.log$&lt;BR /&gt;
blacklist = UPC.log$|cg.log$&lt;BR /&gt;
blacklist = /UPC.log$|cg.log$&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
SP&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 03:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-blacklist-a-specific-string-from-a-log-file/m-p/296504#M56208</guid>
      <dc:creator>sunilpapaiah</dc:creator>
      <dc:date>2017-08-22T03:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to blacklist a specific string from a log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-blacklist-a-specific-string-from-a-log-file/m-p/296505#M56209</link>
      <description>&lt;P&gt;above query did not save the actual entries. please find the correct one tested below.&lt;/P&gt;

&lt;P&gt;blacklist = vol-UPC.log$|cg.log$&lt;BR /&gt;
blacklist = UPC.log$|cg.log$&lt;BR /&gt;
blacklist = /UPC.log$|cg.log$&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 03:40:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-blacklist-a-specific-string-from-a-log-file/m-p/296505#M56209</guid>
      <dc:creator>sunilpapaiah</dc:creator>
      <dc:date>2017-08-22T03:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to blacklist a specific string from a log file</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-blacklist-a-specific-string-from-a-log-file/m-p/296506#M56210</link>
      <description>&lt;P&gt;First thing - regex101.com is your friend. You can pop over there and check out whether your regular expression will match any particular incoming data.&lt;/P&gt;

&lt;P&gt;In this case, if you want this file to be excluded...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; /export/logs/vol-ext-test-ind-UPC-input.log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...and if it's ANY log file with &lt;CODE&gt;UPC&lt;/CODE&gt; somewhere in the file name, then you need a wildcard between &lt;CODE&gt;UPC&lt;/CODE&gt; and &lt;CODE&gt;.log&lt;/CODE&gt; to pick up all those letters in &lt;CODE&gt;-input&lt;/CODE&gt;.  That could be like this... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; blacklist = UPC.*\.log$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now, a &lt;CODE&gt;.&lt;/CODE&gt; matches EVERYTHING, so you will notice that I escaped it with a slash like this &lt;CODE&gt;\.&lt;/CODE&gt;, to tell the system that I meant to match only a period character, not anything else.&lt;/P&gt;

&lt;P&gt;In general, I tend to be paranoid, so I'd also want to make sure that slashes between &lt;CODE&gt;UPC&lt;/CODE&gt; and &lt;CODE&gt;.log&lt;/CODE&gt; were NOT matched.  This would only be relevant if the particular stanza had some directory wildcarding that could potentially come up with a directory that had &lt;CODE&gt;UPC&lt;/CODE&gt; in the name.  That would look something like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; blacklist = UPC[^\/]*\.log$
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Aug 2017 15:01:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-blacklist-a-specific-string-from-a-log-file/m-p/296506#M56210</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-08-22T15:01:22Z</dc:date>
    </item>
  </channel>
</rss>

