<?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: Windows Blacklist Pattern Match Issue in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Blacklist-Pattern-Match-Issue/m-p/457466#M79042</link>
    <description>&lt;P&gt;Hope you have tried props and transforms.conf instead of blacklisting in inputs.conf? &lt;/P&gt;</description>
    <pubDate>Wed, 21 Aug 2019 04:10:00 GMT</pubDate>
    <dc:creator>nareshinsvu</dc:creator>
    <dc:date>2019-08-21T04:10:00Z</dc:date>
    <item>
      <title>Windows Blacklist Pattern Match Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Blacklist-Pattern-Match-Issue/m-p/457465#M79041</link>
      <description>&lt;P&gt;I can't think of a better way to phrase my question without it being a sentence. The issue I'm having is my blacklist is checking for an Event Code (4624) and then a Message that contains Exchange Health Mailbox accounts, but ends up removing ALL 4624 events. I only want to discard the events that have the health mailboxes, but as soon as I make the conf change and the change applies... 4624's stop coming in.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;EDIT:&lt;/STRONG&gt; OK, I found the issue. Full disclosure: some major egg on my face here. In my inputs.conf I have three active blacklists, and each is different in event code and scope. It turns out I coincidentally had a three distinct cases of bad Splunk-specific regex formatting that caused the "Message=" section to break. For my example below, I wanted a case insensitive match and wrapped the regex in (?i) rather than placing (?i) by itself &lt;EM&gt;before&lt;/EM&gt; the section I wanted to match with case insensitivity. Bottom line is my bad regex in the &lt;EM&gt;Message&lt;/EM&gt; key caused that portion of the line to be discarded, leaving only the EventCode key for evaluation. This is odd behavior to me, as I would expect the entire line to be discarded and not simply the bad key, as the end result was I ended up blacklisting all of that event code rather than failing to blacklist anything.&lt;/P&gt;

&lt;P&gt;I think the issue I'm having might still qualify as a bug, maybe, but at least I now know I was mostly shooting myself in the foot!&lt;/P&gt;

&lt;P&gt;Here's an example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blacklist1 = EventCode="4624" Message="Account Name:\s+(?i(HealthMailbox\S+)|(\S+\$))"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Edit: here's what I did to fix the above.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blacklist1 = EventCode="4624" Message="Account Name:\s+(?:(?i)(HealthMailbox\S+)|(\S+\$))"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Aug 2019 03:57:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Windows-Blacklist-Pattern-Match-Issue/m-p/457465#M79041</guid>
      <dc:creator>bwheelock</dc:creator>
      <dc:date>2019-08-21T03:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Blacklist Pattern Match Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Blacklist-Pattern-Match-Issue/m-p/457466#M79042</link>
      <description>&lt;P&gt;Hope you have tried props and transforms.conf instead of blacklisting in inputs.conf? &lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 04:10:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Windows-Blacklist-Pattern-Match-Issue/m-p/457466#M79042</guid>
      <dc:creator>nareshinsvu</dc:creator>
      <dc:date>2019-08-21T04:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Blacklist Pattern Match Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Blacklist-Pattern-Match-Issue/m-p/457467#M79043</link>
      <description>&lt;P&gt;Thanks for the input! For the moment I have avoided switching to that direction, but if it helps troubleshoot why the inputs functionality is not working as expected I can work on that. I presume the main value would be to confirm the regex is working? (Though I've validated the regex against event codes within Splunk already, using the rex command)&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2019 17:05:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Windows-Blacklist-Pattern-Match-Issue/m-p/457467#M79043</guid>
      <dc:creator>bwheelock</dc:creator>
      <dc:date>2019-08-21T17:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Windows Blacklist Pattern Match Issue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Windows-Blacklist-Pattern-Match-Issue/m-p/457468#M79044</link>
      <description>&lt;P&gt;I think the issue I'm having might still qualify as a bug, maybe, but at least I now know I was mostly shooting myself in the foot!&lt;/P&gt;

&lt;P&gt;OK, I found the issue. Full disclosure: some major egg on my face here. In my inputs.conf I have three active blacklists, and each is different in event code and scope. It turns out I coincidentally had a three distinct cases of bad Splunk-specific regex formatting that caused the "Message=" section to break. For my example below, I wanted a case insensitive match and wrapped the regex in (?i) rather than placing (?i) by itself &lt;EM&gt;before&lt;/EM&gt; the section I wanted to match with case insensitivity. Bottom line is my bad regex in the &lt;EM&gt;Message&lt;/EM&gt; key caused that portion of the line to be discarded, leaving only the EventCode key for evaluation. This is odd behavior to me, as I would expect the entire line to be discarded and not simply the bad key, as the end result was I ended up blacklisting all of that event code rather than failing to blacklist anything.&lt;/P&gt;

&lt;P&gt;Here's an example that breaks the &lt;EM&gt;Message&lt;/EM&gt; key causing the blacklist to exclude ALL &lt;EM&gt;EventCode&lt;/EM&gt; key matches:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blacklist1 = EventCode="4624" Message="Account Name:\s+(?i(HealthMailbox\S+)|(\S+\$))"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here's what I did to fix the above bad regex.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;blacklist1 = EventCode="4624" Message="Account Name:\s+(?:(?i)(HealthMailbox\S+)|(\S+\$))"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Aug 2019 21:09:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Windows-Blacklist-Pattern-Match-Issue/m-p/457468#M79044</guid>
      <dc:creator>bwheelock</dc:creator>
      <dc:date>2019-08-21T21:09:51Z</dc:date>
    </item>
  </channel>
</rss>

