<?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: Index some of a certain event code in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Index-some-of-a-certain-event-code/m-p/499310#M85115</link>
    <description>&lt;P&gt;The blacklist has precedence over whitelist, so in this case the blacklist will not index any data from security event 4688. &lt;/P&gt;

&lt;P&gt;"It is not necessary to define both a whitelist and a blacklist in a stanza. They are independent settings. If you do define both and a file matches both, the forwarder does not index that file as blacklist overrides whitelist." this note are from this document&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/7.2.7/Data/Whitelistorblacklistspecificincomingdata"&gt;https://docs.splunk.com/Documentation/SplunkCloud/7.2.7/Data/Whitelistorblacklistspecificincomingdata&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;My suggestion is to use this inputs.conf only&lt;BR /&gt;
[WinEventLog://Security]&lt;BR /&gt;
 disabled = 0&lt;BR /&gt;
 index = test&lt;BR /&gt;
 interval = 60&lt;BR /&gt;
 whitelist = 4688&lt;BR /&gt;
 sourcetype = Security4688&lt;/P&gt;

&lt;P&gt;This props.conf&lt;BR /&gt;
[Security4688]&lt;BR /&gt;
 TRANSFORMS-set = setnull,useronly4688&lt;/P&gt;

&lt;P&gt;and the transforms, because here you are send all the security event 4688 and others to null queue, except those ones  starting with S-1-5-21-&lt;/P&gt;

&lt;P&gt;[setnull]&lt;BR /&gt;
 REGEX = .&lt;BR /&gt;
 DEST_KEY = queue&lt;BR /&gt;
 FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[useronly4688]&lt;BR /&gt;
 REGEX = S-1-5-21-&lt;BR /&gt;
 DEST_KEY = queue&lt;BR /&gt;
 FORMAT = indexQueue&lt;/P&gt;</description>
    <pubDate>Wed, 09 Oct 2019 00:36:27 GMT</pubDate>
    <dc:creator>ivanreis</dc:creator>
    <dc:date>2019-10-09T00:36:27Z</dc:date>
    <item>
      <title>Index some of a certain event code</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-some-of-a-certain-event-code/m-p/499307#M85112</link>
      <description>&lt;P&gt;Follow-up (ish) to &lt;A href="https://answers.splunk.com/answers/757315/why-isnt-my-transforms-working.html"&gt;https://answers.splunk.com/answers/757315/why-isnt-my-transforms-working.html&lt;/A&gt; as I let it sit idle for a while.&lt;/P&gt;

&lt;P&gt;I want to index Event Code 4688: &lt;A href="https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4688"&gt;https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4688&lt;/A&gt; Problem is that it generates a high volume of events. I determined I can filter the field &lt;STRONG&gt;Security_ID&lt;/STRONG&gt; for values starting with &lt;EM&gt;S-1-5-21-&lt;/EM&gt; (includes real users only). I want this to apply only to event code 4688. All other events should process normally.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;inputs.conf (forwarder app)&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinEventLog://Security]
disabled = 0
index = test
interval = 60
blacklist = 4688

[WinEventLog://Security]
disabled = 0
index = test
interval = 60
whitelist = 4688
sourcetype = Security4688
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;\etc\apps\myapp\local\props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[Security4688]
TRANSFORMS-set = setnull,useronly4688
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;\etc\apps\myapp\local\transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[useronly4688]
REGEX = S-1-5-21-
DEST_KEY = queue
FORMAT = indexQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My thought was to have the forwarder change the sourcetype of event 4688, and leave all others alone. On the server, props can use that sourcetype to only use the regular expression on event 4688, and send non-matches to nullQueue. What's wrong here? Is it my use of duplicate stanzas?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 18:27:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-some-of-a-certain-event-code/m-p/499307#M85112</guid>
      <dc:creator>tmontney</dc:creator>
      <dc:date>2019-10-08T18:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Index some of a certain event code</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-some-of-a-certain-event-code/m-p/499308#M85113</link>
      <description>&lt;P&gt;They're not really duplicate stanzas, just the same stanza with multiple definitions.  Splunk merges all attributes with the same stanza name into a single stanza.  So in this case you'll end up with EventCode 4688 on both the whitelist and blacklist.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 18:43:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-some-of-a-certain-event-code/m-p/499308#M85113</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-10-08T18:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Index some of a certain event code</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-some-of-a-certain-event-code/m-p/499309#M85114</link>
      <description>&lt;P&gt;So how would I index the Security log, where 4688 becomes a different sourcetype, and the rest of the Security log indexes like normal? Separate apps?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 21:25:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-some-of-a-certain-event-code/m-p/499309#M85114</guid>
      <dc:creator>tmontney</dc:creator>
      <dc:date>2019-10-08T21:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Index some of a certain event code</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Index-some-of-a-certain-event-code/m-p/499310#M85115</link>
      <description>&lt;P&gt;The blacklist has precedence over whitelist, so in this case the blacklist will not index any data from security event 4688. &lt;/P&gt;

&lt;P&gt;"It is not necessary to define both a whitelist and a blacklist in a stanza. They are independent settings. If you do define both and a file matches both, the forwarder does not index that file as blacklist overrides whitelist." this note are from this document&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/7.2.7/Data/Whitelistorblacklistspecificincomingdata"&gt;https://docs.splunk.com/Documentation/SplunkCloud/7.2.7/Data/Whitelistorblacklistspecificincomingdata&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;My suggestion is to use this inputs.conf only&lt;BR /&gt;
[WinEventLog://Security]&lt;BR /&gt;
 disabled = 0&lt;BR /&gt;
 index = test&lt;BR /&gt;
 interval = 60&lt;BR /&gt;
 whitelist = 4688&lt;BR /&gt;
 sourcetype = Security4688&lt;/P&gt;

&lt;P&gt;This props.conf&lt;BR /&gt;
[Security4688]&lt;BR /&gt;
 TRANSFORMS-set = setnull,useronly4688&lt;/P&gt;

&lt;P&gt;and the transforms, because here you are send all the security event 4688 and others to null queue, except those ones  starting with S-1-5-21-&lt;/P&gt;

&lt;P&gt;[setnull]&lt;BR /&gt;
 REGEX = .&lt;BR /&gt;
 DEST_KEY = queue&lt;BR /&gt;
 FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[useronly4688]&lt;BR /&gt;
 REGEX = S-1-5-21-&lt;BR /&gt;
 DEST_KEY = queue&lt;BR /&gt;
 FORMAT = indexQueue&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2019 00:36:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Index-some-of-a-certain-event-code/m-p/499310#M85115</guid>
      <dc:creator>ivanreis</dc:creator>
      <dc:date>2019-10-09T00:36:27Z</dc:date>
    </item>
  </channel>
</rss>

