<?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 using transforms,conf to filter events with two conditions in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93951#M24189</link>
    <description>&lt;P&gt;I have this regex expresion:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;REGEX = (?m)^EventCode=(4674)|(ServerName\$)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;This works great to identify the two conditions useing the "&lt;A href="http://gskinner.com/RegExr/"&gt;http://gskinner.com/RegExr/&lt;/A&gt;" tool&lt;/P&gt;

&lt;P&gt;When I turn it on useing Props.conf to identify the server and transforms.conf to identify the two conditions it blocks all EventCode=4674, not just the ones with "ServerName$" in the event&lt;/P&gt;

&lt;P&gt;Is there a better tool than "&lt;A href="http://gskinner.com/RegExr/"&gt;http://gskinner.com/RegExr/&lt;/A&gt;" to test Regex&lt;/P&gt;

&lt;P&gt;Sorry All&lt;/P&gt;

&lt;P&gt;I do have the escape carecter in the regex befor the $.  it was a typo.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;REGEX = (?m)^EventCode=(4674)|(ServerName\$)&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Oct 2011 20:35:42 GMT</pubDate>
    <dc:creator>hartfoml</dc:creator>
    <dc:date>2011-10-18T20:35:42Z</dc:date>
    <item>
      <title>using transforms,conf to filter events with two conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93951#M24189</link>
      <description>&lt;P&gt;I have this regex expresion:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;REGEX = (?m)^EventCode=(4674)|(ServerName\$)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;This works great to identify the two conditions useing the "&lt;A href="http://gskinner.com/RegExr/"&gt;http://gskinner.com/RegExr/&lt;/A&gt;" tool&lt;/P&gt;

&lt;P&gt;When I turn it on useing Props.conf to identify the server and transforms.conf to identify the two conditions it blocks all EventCode=4674, not just the ones with "ServerName$" in the event&lt;/P&gt;

&lt;P&gt;Is there a better tool than "&lt;A href="http://gskinner.com/RegExr/"&gt;http://gskinner.com/RegExr/&lt;/A&gt;" to test Regex&lt;/P&gt;

&lt;P&gt;Sorry All&lt;/P&gt;

&lt;P&gt;I do have the escape carecter in the regex befor the $.  it was a typo.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;REGEX = (?m)^EventCode=(4674)|(ServerName\$)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2011 20:35:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93951#M24189</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2011-10-18T20:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: using transforms,conf to filter events with two conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93952#M24190</link>
      <description>&lt;P&gt;Well the &lt;CODE&gt;|&lt;/CODE&gt; character is an OR operator, so I'm a but surprised that it is working properly in RegExr (though it is an excellent tool, so I'm not brave enough to say that it is absolutely wrong and I'm right).&lt;/P&gt;

&lt;P&gt;If you're searching for events that contain the EventCode first AND then the ServerName at the end, you should be using something like ".+" or ".+?" in your regex instead of "|".&lt;/P&gt;

&lt;P&gt;As for other regex sites, I always liked &lt;A href="http://regexpal.com/"&gt;http://regexpal.com/&lt;/A&gt; .&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2011 20:55:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93952#M24190</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-10-18T20:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: using transforms,conf to filter events with two conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93953#M24191</link>
      <description>&lt;P&gt;I must be doing something wrong becasue this works in the regexpal tool too.&lt;/P&gt;

&lt;P&gt;Here is the event snipit:&lt;/P&gt;

&lt;P&gt;SourceName=Microsoft Windows security auditing.&lt;BR /&gt;
EventCode=4674&lt;BR /&gt;
EventType=0&lt;BR /&gt;
Type=Information&lt;BR /&gt;
ComputerName=Servername.domain.com&lt;BR /&gt;
TaskCategory=Sensitive Privilege Use&lt;BR /&gt;
OpCode=Info&lt;BR /&gt;
RecordNumber=29387782&lt;BR /&gt;
Keywords=Audit Success&lt;BR /&gt;
Message=An operation was attempted on a privileged object.&lt;BR /&gt;
Subject:&lt;BR /&gt;
    Security ID:        S-1-5-20&lt;BR /&gt;
    Account Name:       ServerName$&lt;BR /&gt;
    Account Domain:     Domain&lt;BR /&gt;
        Logon ID:       0x3e4&lt;/P&gt;

&lt;P&gt;When I use the REGEX "EventCode=(4674)|(ServerName\$)" the tool finds both contitions&lt;/P&gt;

&lt;P&gt;Maybe it is finding the first OR the second.&lt;/P&gt;

&lt;P&gt;The regex to find both like EventCode=(4674).+(ServerName\$) does not find either condition&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2011 21:15:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93953#M24191</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2011-10-18T21:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: using transforms,conf to filter events with two conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93954#M24192</link>
      <description>&lt;P&gt;Also if I use this at the search line it works but I don't know how to turn this into a REGEX for the Transforms.conf&lt;/P&gt;

&lt;P&gt;host=ServerName | regex _raw=(?m)^EventCode=(4674) | regex _raw=(ServerName\$)&lt;/P&gt;

&lt;P&gt;Thanks for the help&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2011 21:22:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93954#M24192</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2011-10-18T21:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: using transforms,conf to filter events with two conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93955#M24193</link>
      <description>&lt;P&gt;You need the (?s) modifier to make &lt;CODE&gt;.&lt;/CODE&gt; match newlines.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2011 21:27:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93955#M24193</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-10-18T21:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: using transforms,conf to filter events with two conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93956#M24194</link>
      <description>&lt;P&gt;Can you show me an example&lt;/P&gt;

&lt;P&gt;I tried this "EventCode=(4674).+?(ServerName\$)"&lt;/P&gt;

&lt;P&gt;And it did not work&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2011 21:31:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93956#M24194</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2011-10-18T21:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: using transforms,conf to filter events with two conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93957#M24195</link>
      <description>&lt;P&gt;&lt;CODE&gt;(?s)EventCode=(4674).+?(ServerName\$)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2011 21:37:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93957#M24195</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-10-18T21:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: using transforms,conf to filter events with two conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93958#M24196</link>
      <description>&lt;P&gt;I tried what you posted and I got this&lt;BR /&gt;
![alt text][1]&lt;/P&gt;

&lt;P&gt;Sorry tried to upload the immage not working&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2011 21:57:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93958#M24196</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2011-10-18T21:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: using transforms,conf to filter events with two conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93959#M24197</link>
      <description>&lt;P&gt;Thanks for trying&lt;/P&gt;

&lt;P&gt;I will open a case with Splunk to get this resolved&lt;/P&gt;

&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2011 22:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93959#M24197</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2011-10-18T22:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: using transforms,conf to filter events with two conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93960#M24198</link>
      <description>&lt;P&gt;So you're saying it doesn't work? I just tried it in RegExr and it works as it should.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2011 22:12:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93960#M24198</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2011-10-18T22:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: using transforms,conf to filter events with two conditions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93961#M24199</link>
      <description>&lt;P&gt;You were right I was wrong I was able to use your suggestion and I was able to find out what I was doing wrong with the tester&lt;/P&gt;

&lt;P&gt;This was the answer and thanks very much for your help&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2011 14:36:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/using-transforms-conf-to-filter-events-with-two-conditions/m-p/93961#M24199</guid>
      <dc:creator>hartfoml</dc:creator>
      <dc:date>2011-10-19T14:36:09Z</dc:date>
    </item>
  </channel>
</rss>

