<?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: Why is Windows Event Log Whitelist not working? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Windows-Event-Log-Whitelist-not-working/m-p/621358#M107027</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/191266"&gt;@shocko&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;The first Event is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;Channel&amp;gt;DhcpAdminEvents&amp;lt;/Channel&amp;gt; &lt;/LI-CODE&gt;&lt;P&gt;So this one is processed by your&amp;nbsp;&lt;EM&gt;DHCPAdminEvents&lt;/EM&gt; Stanza. There is no white/blacklist, so it is processed.&lt;BR /&gt;&lt;BR /&gt;To allow the second Event, I guess the whitelist entry has to be adjusted.&amp;nbsp;&lt;BR /&gt;I did not use this recently, but looking at the docs it has to be key=regex syntax.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;"SourceName" is not the key I guess....isn't it "EventSourceName".&amp;nbsp; And maybe even something like "System.Provider.EventSourceName"? (not sure about that part right now)&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;In &lt;A href="https://community.splunk.com/t5/Getting-Data-In/In-inputs-conf-whitelist-how-do-I-create-a-regex-expression-for/m-p/429466/highlight/true#M75230" target="_self"&gt;this&lt;/A&gt; (2018) post Nick mentions, that quotations in the regex might be an issue. Maybe try to escape them&amp;nbsp;&lt;EM&gt;EventSourceName=\"DhcpServer\"&lt;/EM&gt;. Or something like&amp;nbsp;&lt;EM&gt;EventSourceName\S\SDhcpServer\S&lt;/EM&gt;&amp;nbsp;&amp;nbsp; (just to try if the quotations are an issue also when escaped)&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Fri, 18 Nov 2022 09:43:54 GMT</pubDate>
    <dc:creator>rnowitzki</dc:creator>
    <dc:date>2022-11-18T09:43:54Z</dc:date>
    <item>
      <title>Why is Windows Event Log Whitelist not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Windows-Event-Log-Whitelist-not-working/m-p/620821#M106956</link>
      <description>&lt;P&gt;Running a Windows 2012 R2 DHCP Server with UF 9.0.1 and Splunk Enterprise 8.0.5. My inputs at the UF look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[default]
index = windowsdhcp
_TCP_ROUTING = prod

[WinEventLog://System]
start_from = oldest
disabled = 0
current_only = 0
whitelist1 = SourceName="DhcpServer"
whitelist2 = SourceName="Dhcp-Server"

[WinEventLog://DHCPAdminEvents]
start_from = oldest
disabled = 0&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My issue is that the whitelisted events in the 1st stanza are not getting processed to the indexer. If I review the XML of the events in the Windows Event Viewer:&lt;/P&gt;
&lt;P&gt;These events &lt;FONT color="#339966"&gt;are collected and indexed&lt;/FONT&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;- &amp;lt;Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"&amp;gt;
- &amp;lt;System&amp;gt;
  &amp;lt;Provider Name="Microsoft-Windows-DHCP-Server" Guid="{6D64F02C-A125-4DAC-9A01-F0555B41CA84}" /&amp;gt; 
  &amp;lt;EventID&amp;gt;20251&amp;lt;/EventID&amp;gt; 
  &amp;lt;Version&amp;gt;0&amp;lt;/Version&amp;gt; 
  &amp;lt;Level&amp;gt;4&amp;lt;/Level&amp;gt; 
  &amp;lt;Task&amp;gt;121&amp;lt;/Task&amp;gt; 
  &amp;lt;Opcode&amp;gt;106&amp;lt;/Opcode&amp;gt; 
  &amp;lt;Keywords&amp;gt;0x2000000000000000&amp;lt;/Keywords&amp;gt; 
  &amp;lt;TimeCreated SystemTime="2022-10-29T12:25:40.655052000Z" /&amp;gt; 
  &amp;lt;EventRecordID&amp;gt;161&amp;lt;/EventRecordID&amp;gt; 
  &amp;lt;Correlation /&amp;gt; 
  &amp;lt;Execution ProcessID="3884" ThreadID="4472" /&amp;gt; 
  &amp;lt;Channel&amp;gt;DhcpAdminEvents&amp;lt;/Channel&amp;gt; 
  &amp;lt;Computer&amp;gt;dhcp-srv-a.mydomain.com&amp;lt;/Computer&amp;gt; 
  &amp;lt;Security UserID="S-1-5-20" /&amp;gt; 
  &amp;lt;/System&amp;gt;
- &amp;lt;EventData&amp;gt;
  &amp;lt;Data Name="Server"&amp;gt;dhcp-srv-b.mydomain.com&amp;lt;/Data&amp;gt; 
  &amp;lt;Data Name="RelationName"&amp;gt;dhcp-srv-b.mydomain.com-dhcp-srv-a.mydomain.com&amp;lt;/Data&amp;gt; 
  &amp;lt;Data Name="OldState"&amp;gt;COMMUNICATION_INT&amp;lt;/Data&amp;gt; 
  &amp;lt;Data Name="NewState"&amp;gt;NORMAL&amp;lt;/Data&amp;gt; 
  &amp;lt;/EventData&amp;gt;
  &amp;lt;/Event&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;These events &lt;FONT color="#FF0000"&gt;do not get captured (Note: event is in classic format)&lt;/FONT&gt;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Log Name:      System
Source:        Microsoft-Windows-DHCP-Server
Date:          14/11/2022 23:11:37
Event ID:      1376
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      dhcp-srv-a.mydomain.com
Description:
IP address range of scope 10.119.6.0 is 89 percent full with only 6 IP addresses available.
Event Xml:
&amp;lt;Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"&amp;gt;
  &amp;lt;System&amp;gt;
    &amp;lt;Provider Name="Microsoft-Windows-DHCP-Server" Guid="{6D64F02C-A125-4DAC-9A01-F0555B41CA84}" EventSourceName="DhcpServer" /&amp;gt;
    &amp;lt;EventID Qualifiers="0"&amp;gt;1376&amp;lt;/EventID&amp;gt;
    &amp;lt;Version&amp;gt;0&amp;lt;/Version&amp;gt;
    &amp;lt;Level&amp;gt;3&amp;lt;/Level&amp;gt;
    &amp;lt;Task&amp;gt;0&amp;lt;/Task&amp;gt;
    &amp;lt;Opcode&amp;gt;0&amp;lt;/Opcode&amp;gt;
    &amp;lt;Keywords&amp;gt;0x80000000000000&amp;lt;/Keywords&amp;gt;
    &amp;lt;TimeCreated SystemTime="2022-11-14T23:11:37.000000000Z" /&amp;gt;
    &amp;lt;EventRecordID&amp;gt;87097&amp;lt;/EventRecordID&amp;gt;
    &amp;lt;Correlation /&amp;gt;
    &amp;lt;Execution ProcessID="0" ThreadID="0" /&amp;gt;
    &amp;lt;Channel&amp;gt;System&amp;lt;/Channel&amp;gt;
    &amp;lt;Computer&amp;gt;dhcp-srv-a.mydomain.com&amp;lt;/Computer&amp;gt;
    &amp;lt;Security /&amp;gt;
  &amp;lt;/System&amp;gt;
  &amp;lt;EventData&amp;gt;
    &amp;lt;Data&amp;gt;10.119.6.0&amp;lt;/Data&amp;gt;
    &amp;lt;Data&amp;gt;89&amp;lt;/Data&amp;gt;
    &amp;lt;Data&amp;gt;6&amp;lt;/Data&amp;gt;
  &amp;lt;/EventData&amp;gt;
&amp;lt;/Event&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can't see why it is not collecting the second event via the 1st stanza?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 00:18:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Windows-Event-Log-Whitelist-not-working/m-p/620821#M106956</guid>
      <dc:creator>shocko</dc:creator>
      <dc:date>2022-11-15T00:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Windows Event Log Whitelist not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Windows-Event-Log-Whitelist-not-working/m-p/621358#M107027</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/191266"&gt;@shocko&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;The first Event is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;Channel&amp;gt;DhcpAdminEvents&amp;lt;/Channel&amp;gt; &lt;/LI-CODE&gt;&lt;P&gt;So this one is processed by your&amp;nbsp;&lt;EM&gt;DHCPAdminEvents&lt;/EM&gt; Stanza. There is no white/blacklist, so it is processed.&lt;BR /&gt;&lt;BR /&gt;To allow the second Event, I guess the whitelist entry has to be adjusted.&amp;nbsp;&lt;BR /&gt;I did not use this recently, but looking at the docs it has to be key=regex syntax.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;"SourceName" is not the key I guess....isn't it "EventSourceName".&amp;nbsp; And maybe even something like "System.Provider.EventSourceName"? (not sure about that part right now)&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;In &lt;A href="https://community.splunk.com/t5/Getting-Data-In/In-inputs-conf-whitelist-how-do-I-create-a-regex-expression-for/m-p/429466/highlight/true#M75230" target="_self"&gt;this&lt;/A&gt; (2018) post Nick mentions, that quotations in the regex might be an issue. Maybe try to escape them&amp;nbsp;&lt;EM&gt;EventSourceName=\"DhcpServer\"&lt;/EM&gt;. Or something like&amp;nbsp;&lt;EM&gt;EventSourceName\S\SDhcpServer\S&lt;/EM&gt;&amp;nbsp;&amp;nbsp; (just to try if the quotations are an issue also when escaped)&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Fri, 18 Nov 2022 09:43:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Windows-Event-Log-Whitelist-not-working/m-p/621358#M107027</guid>
      <dc:creator>rnowitzki</dc:creator>
      <dc:date>2022-11-18T09:43:54Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Windows Event Log Whitelist not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Windows-Event-Log-Whitelist-not-working/m-p/621612#M107050</link>
      <description>&lt;P&gt;The plot thickens! So the sourcename was actually&amp;nbsp;&lt;SPAN&gt;&lt;FONT color="#008000"&gt;&lt;STRONG&gt;&lt;EM&gt;Microsoft-Windows-DHCP-Server&lt;/EM&gt;. &lt;/STRONG&gt;&lt;FONT color="#000000"&gt;This is as per the copy/paste to notepad of the XML view in Widows event veiwer and shown above as&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Log Name:      System
Source:        Microsoft-Windows-DHCP-Server
Date:          14/11/2022 23:11:37
Event ID:      1376
Task Category: None
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      dhcp-srv-a.mydomain.com
Description:
IP address range of scope 10.119.6.0 is 89 percent full with only 6 IP addresses available.
Event Xml:
&amp;lt;Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"&amp;gt;
  &amp;lt;System&amp;gt;
    &amp;lt;Provider Name="Microsoft-Windows-DHCP-Server" Guid="{6D64F02C-A125-4DAC-9A01-F0555B41CA84}" EventSourceName="DhcpServer" /&amp;gt;
    &amp;lt;EventID Qualifiers="0"&amp;gt;1376&amp;lt;/EventID&amp;gt;
    &amp;lt;Version&amp;gt;0&amp;lt;/Version&amp;gt;
    &amp;lt;Level&amp;gt;3&amp;lt;/Level&amp;gt;
    &amp;lt;Task&amp;gt;0&amp;lt;/Task&amp;gt;
    &amp;lt;Opcode&amp;gt;0&amp;lt;/Opcode&amp;gt;
    &amp;lt;Keywords&amp;gt;0x80000000000000&amp;lt;/Keywords&amp;gt;
    &amp;lt;TimeCreated SystemTime="2022-11-14T23:11:37.000000000Z" /&amp;gt;
    &amp;lt;EventRecordID&amp;gt;87097&amp;lt;/EventRecordID&amp;gt;
    &amp;lt;Correlation /&amp;gt;
    &amp;lt;Execution ProcessID="0" ThreadID="0" /&amp;gt;
    &amp;lt;Channel&amp;gt;System&amp;lt;/Channel&amp;gt;
    &amp;lt;Computer&amp;gt;dhcp-srv-a.mydomain.com&amp;lt;/Computer&amp;gt;
    &amp;lt;Security /&amp;gt;
  &amp;lt;/System&amp;gt;
  &amp;lt;EventData&amp;gt;
    &amp;lt;Data&amp;gt;10.119.6.0&amp;lt;/Data&amp;gt;
    &amp;lt;Data&amp;gt;89&amp;lt;/Data&amp;gt;
    &amp;lt;Data&amp;gt;6&amp;lt;/Data&amp;gt;
  &amp;lt;/EventData&amp;gt;
&amp;lt;/Event&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I updated my input stanza as follows and now working :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[WinEventLog://System]
start_from = oldest
disabled = 0
current_only = 0 
whitelist1 = SourceName="Microsoft-Windows-DHCP-Server"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I basically pushed all events from the System event log to my testSplunk instance and saw what &lt;STRONG&gt;SourceName&lt;/STRONG&gt; it pulled out of the classic event. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That said, I am now still getting ALL events frm the System log! My entire inputs.conf file is as follows&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[default]
index = windowsdhcp
_TCP_ROUTING = ssl-production

[WinEventLog://System]
start_from = oldest
disabled = 0
current_only = 0 
whitelist = SourceName="Microsoft-Windows-DHCP-Server"

[WinEventLog://DHCPAdminEvents]
start_from = oldest
disabled = 0

[WinEventLog://Microsoft-Windows-Dhcp-Server/Operational]
start_from = oldest
disabled = 0

[monitor://$WINDIR\System32\DHCP]
disabled = 0
whitelist = DhcpSrvLog*
crcSalt = &amp;lt;SOURCE&amp;gt;
sourcetype = DhcpSrvLog
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I then change my inputs to this to see if I can stop any system events coming whatsoever!&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[default]
index = windowsdhcp
_TCP_ROUTING = ssl-production

[monitor://$WINDIR\System32\DHCP]
disabled = 0
whitelist = DhcpSrvLog*
crcSalt = &amp;lt;SOURCE&amp;gt;
sourcetype = DhcpSrvLog
&lt;/LI-CODE&gt;&lt;P&gt;But they keep on coming even though the change is present and btool output does not show any entries for &lt;STRONG&gt;WinEventLog://System&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I had to restart the universal forwarder so it to stop picking up all System event log events.&amp;nbsp; On anoher DHCP server I am back to square one with the original monitoring stanza not working with the whitelisting&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm really stumped as to what is going on here! It#s almost like &lt;STRONG&gt;current_only&lt;/STRONG&gt; has no effect &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 22:56:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Windows-Event-Log-Whitelist-not-working/m-p/621612#M107050</guid>
      <dc:creator>shocko</dc:creator>
      <dc:date>2022-11-21T22:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why is Windows Event Log Whitelist not working?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-Windows-Event-Log-Whitelist-not-working/m-p/621749#M107058</link>
      <description>&lt;P&gt;I finally figured it out!&amp;nbsp; So I suspected that the UF thought it had already collected these events so I had a look into this file &lt;EM&gt;&lt;STRONG&gt;%SPLUNK_HOME %\var\lib\splunk\modinputs\WinEventLog\System&lt;/STRONG&gt; &lt;/EM&gt;which basically contains a record where the UF left off on a given WinEventlog i.e. the EventID it last consumed.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;BookmarkList&amp;gt;
  &amp;lt;Bookmark Channel='System' RecordId='1236992' IsCurrent='true'/&amp;gt;
&amp;lt;/BookmarkList&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Event 1236992 is one higher than the last instance of the events I wish to whitelist and consume (you can see the EventID in the windows event viewer). I stepped through the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Stopped the UF&lt;/LI&gt;&lt;LI&gt;Deleted this file&lt;/LI&gt;&lt;LI&gt;Started the UF&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I now have all my events!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: this may contain duplicates events so we can use delete to remove them based on EventID.&amp;nbsp;&amp;nbsp;I then deleted other events form my index that I did not require via &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Delete" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Delete&lt;/A&gt;. &lt;FONT color="#FF0000"&gt;Be careful if running this!&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 19:49:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-Windows-Event-Log-Whitelist-not-working/m-p/621749#M107058</guid>
      <dc:creator>shocko</dc:creator>
      <dc:date>2022-11-22T19:49:04Z</dc:date>
    </item>
  </channel>
</rss>

