<?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 filter out multiple fields in the same transform with regex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-multiple-fields-in-the-same-transform-with/m-p/165451#M47020</link>
    <description>&lt;P&gt;I'm not very familiar with the format of Windows security logs, but I see some possible approaches:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Add the &lt;CODE&gt;user&lt;/CODE&gt; regex to the &lt;CODE&gt;EventCode&lt;/CODE&gt;regex, such as &lt;CODE&gt;(?m)EventCode=(123|456|...|899).*user=(someuser|otheruser)&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Have two &lt;CODE&gt;TRANSFORM&lt;/CODE&gt;s, &lt;CODE&gt;setnull-eventcodes&lt;/CODE&gt; and &lt;CODE&gt;setnull-users&lt;/CODE&gt;, so you get a config like this:
 [setnull-eventcodes]
 REGEX = ...
 DEST_KEY = queue
 FORMAT = nullQueue
 [setnull-users]
 REGEX = ...
 DEST_KEY = queue
 FORMAT = nullQueue
 [WinEventLog:Security]
 TRANSFORMS-setnull0 = setnull-eventcodes
 TRANSFORMS-setnull1 = setnull-eventcodes&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Mon, 28 Sep 2020 19:07:33 GMT</pubDate>
    <dc:creator>laserval</dc:creator>
    <dc:date>2020-09-28T19:07:33Z</dc:date>
    <item>
      <title>How to filter out multiple fields in the same transform with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-multiple-fields-in-the-same-transform-with/m-p/165450#M47019</link>
      <description>&lt;P&gt;I’m in a pickle (splunk license) again this morning and I’m trying to address it via a transform.&lt;/P&gt;

&lt;P&gt;bit bucket for windows security events&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull1]
REGEX=(?m)EventCode=(515|517|537|538|540|551|552|560|565|566|576|577|578|592|593|600|601|626|627|628|629|633|641|642|645|646|647|659|660|661|664|665|666|671|672|673|674|675|680|682|683|684|832|833|835|836|837|861|4688|4902|4674|4675|4663$
REGEX=(user= someuserid|anotheruserid|anotheruserid)
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The stuff I've commented out below doesn’t work: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX=(user=someuserid|anotheruserid|anotheruserid)
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I accomplish this?  Basically my issue is I have a working transform for:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WinEventLog:Security]
TRANSFORMS-set = setnull1

[WinEventLog:security]
TRANSFORMS-set = setnull1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to regex out another field in the same transform. Is this possible?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2015 10:46:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-multiple-fields-in-the-same-transform-with/m-p/165450#M47019</guid>
      <dc:creator>cdupuis123</dc:creator>
      <dc:date>2015-03-06T10:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out multiple fields in the same transform with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-multiple-fields-in-the-same-transform-with/m-p/165451#M47020</link>
      <description>&lt;P&gt;I'm not very familiar with the format of Windows security logs, but I see some possible approaches:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Add the &lt;CODE&gt;user&lt;/CODE&gt; regex to the &lt;CODE&gt;EventCode&lt;/CODE&gt;regex, such as &lt;CODE&gt;(?m)EventCode=(123|456|...|899).*user=(someuser|otheruser)&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Have two &lt;CODE&gt;TRANSFORM&lt;/CODE&gt;s, &lt;CODE&gt;setnull-eventcodes&lt;/CODE&gt; and &lt;CODE&gt;setnull-users&lt;/CODE&gt;, so you get a config like this:
 [setnull-eventcodes]
 REGEX = ...
 DEST_KEY = queue
 FORMAT = nullQueue
 [setnull-users]
 REGEX = ...
 DEST_KEY = queue
 FORMAT = nullQueue
 [WinEventLog:Security]
 TRANSFORMS-setnull0 = setnull-eventcodes
 TRANSFORMS-setnull1 = setnull-eventcodes&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:07:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-multiple-fields-in-the-same-transform-with/m-p/165451#M47020</guid>
      <dc:creator>laserval</dc:creator>
      <dc:date>2020-09-28T19:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out multiple fields in the same transform with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-multiple-fields-in-the-same-transform-with/m-p/165452#M47021</link>
      <description>&lt;P&gt;Well thanks for the suggestion, but neither are working.  It seems that it only process's one transform.  My last attempt my props was this:&lt;BR /&gt;
[WinEventLog:Security]&lt;BR /&gt;
TRANSFORMS-set = setnull1&lt;BR /&gt;
TRANSFORMS-set = setnull5&lt;/P&gt;

&lt;P&gt;[WinEventLog:security]&lt;BR /&gt;
TRANSFORMS-set = setnull1&lt;BR /&gt;
TRANSFORMS-set = setnull5&lt;/P&gt;

&lt;P&gt;And my transforms is this:&lt;/P&gt;

&lt;H1&gt;bit bucket for windows security events&lt;/H1&gt;

&lt;P&gt;[setnull1]&lt;BR /&gt;
REGEX=(?m)EventCode=(515|517|537|538|540|551|552|560|565|566|576|577|578|592|593|600|601|626|627|628|629|633|641|642|645|646$&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[setnull5]&lt;BR /&gt;
REGEX=user=someusername&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;I attempted to add "user=" on the end of the close "paran )" but Splunk just ignored it.  &lt;/P&gt;

&lt;P&gt;I'm stymied&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2015 09:36:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-multiple-fields-in-the-same-transform-with/m-p/165452#M47021</guid>
      <dc:creator>cdupuis123</dc:creator>
      <dc:date>2015-03-15T09:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out multiple fields in the same transform with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-multiple-fields-in-the-same-transform-with/m-p/165453#M47022</link>
      <description>&lt;P&gt;You can have more than one transform stanza referenced under a single TRANSFORM heading in props.conf, you just add commas between them.&lt;/P&gt;

&lt;P&gt;Something like this should work.&lt;/P&gt;

&lt;P&gt;Transforms.conf&lt;BR /&gt;
&lt;CODE&gt;[setnull1]&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;REGEX=(?m)EventCode=(515|517|537|538|540|551|552|560|565|566|576|577|578|592|593|600|601|626|627|628|629|633|641|642|645|646)&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;DEST_KEY = queue&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;FORMAT = nullQueue&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[setnull2]&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;REGEX = (?mi)user\s*?=\s*?(userid1|userid2|userid3)&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;DEST_KEY = queue&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;FORMAT = nullQueue&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
&lt;CODE&gt;[WinEventLog:Security]&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;TRANSFORMS-setnullqueue = setnull1, setnull2&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2015 10:48:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-multiple-fields-in-the-same-transform-with/m-p/165453#M47022</guid>
      <dc:creator>eddit0r</dc:creator>
      <dc:date>2015-03-15T10:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter out multiple fields in the same transform with regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-multiple-fields-in-the-same-transform-with/m-p/165454#M47023</link>
      <description>&lt;P&gt;Thanks for the help eddit0r worked mint after I figured out that the space between:&lt;BR /&gt;
TRANSFORMS-setnullqueue = setnull1, setnull2&lt;BR /&gt;
should not be there.  Found another thread titled "Filtering Windows event logs" then changed my props and volia!  v8 moment...&lt;/P&gt;

&lt;P&gt;Working now!&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2015 18:21:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-filter-out-multiple-fields-in-the-same-transform-with/m-p/165454#M47023</guid>
      <dc:creator>cdupuis123</dc:creator>
      <dc:date>2015-03-15T18:21:54Z</dc:date>
    </item>
  </channel>
</rss>

