<?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 How to write regex in transforms.conf to filter events to null queue? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-in-transforms-conf-to-filter-events-to-null/m-p/153330#M43022</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;I am having difficulty filtering events via my props/transform.conf files. Below are my key stanza's from my transforms and props.conf files. My question is in regard to regular expressions. If I want to filter out something such a *NIX path like &lt;CODE&gt;/opt/WVRTSralus/bin/beremote&lt;/CODE&gt;; do I have to replace the / with a REGEX \W &lt;BR /&gt;
to get exe\W\W\Wopt\WVRTSralux\Wbin\Wberemote\W, as I have outlined below?&lt;/P&gt;

&lt;P&gt;Or can I get away with REGEX = (exe=opt//opt/WVRTSralus/bin/beremote)&lt;/P&gt;

&lt;P&gt;Transforms.conf-----&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
LOOKAHEAD = 100000
REGEX = (\Wopt\WMcAfee\W|opt\Wvmware\Wtools\W|\Wopt\WNAI\W|\Wusr\Wshare\Wlocale\W|\W\Wso|\W\Wso\W\d|\Wusr\Wshare\Wlocale\W|\Wopt\Wsplunkforwarder\W|\Whome\Wbserver\WCode\W|proc\Wnet\W|exe\W\W\Wopt\WVRTSralux\Wbin\Wberemote\W)
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf ------&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/var/log/audit/audit.log]
TRANSFORMS-null=setnull
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 06 Oct 2014 16:59:55 GMT</pubDate>
    <dc:creator>andrewbeeber</dc:creator>
    <dc:date>2014-10-06T16:59:55Z</dc:date>
    <item>
      <title>How to write regex in transforms.conf to filter events to null queue?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-in-transforms-conf-to-filter-events-to-null/m-p/153330#M43022</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;I am having difficulty filtering events via my props/transform.conf files. Below are my key stanza's from my transforms and props.conf files. My question is in regard to regular expressions. If I want to filter out something such a *NIX path like &lt;CODE&gt;/opt/WVRTSralus/bin/beremote&lt;/CODE&gt;; do I have to replace the / with a REGEX \W &lt;BR /&gt;
to get exe\W\W\Wopt\WVRTSralux\Wbin\Wberemote\W, as I have outlined below?&lt;/P&gt;

&lt;P&gt;Or can I get away with REGEX = (exe=opt//opt/WVRTSralus/bin/beremote)&lt;/P&gt;

&lt;P&gt;Transforms.conf-----&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
LOOKAHEAD = 100000
REGEX = (\Wopt\WMcAfee\W|opt\Wvmware\Wtools\W|\Wopt\WNAI\W|\Wusr\Wshare\Wlocale\W|\W\Wso|\W\Wso\W\d|\Wusr\Wshare\Wlocale\W|\Wopt\Wsplunkforwarder\W|\Whome\Wbserver\WCode\W|proc\Wnet\W|exe\W\W\Wopt\WVRTSralux\Wbin\Wberemote\W)
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf ------&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/var/log/audit/audit.log]
TRANSFORMS-null=setnull
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Oct 2014 16:59:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-in-transforms-conf-to-filter-events-to-null/m-p/153330#M43022</guid>
      <dc:creator>andrewbeeber</dc:creator>
      <dc:date>2014-10-06T16:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to write regex in transforms.conf to filter events to null queue?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-in-transforms-conf-to-filter-events-to-null/m-p/153331#M43023</link>
      <description>&lt;P&gt;If you want to filter on the path, then the regular expression is the path:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX=/opt/WVRTSralus/bin/beremote
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want multiples, you can use the &lt;CODE&gt;|&lt;/CODE&gt; - I add the &lt;CODE&gt;()&lt;/CODE&gt; for clarity&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX=(:/opt/WVRTSralus/bin/beremote)|(:/opt/splunkforwarder)
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If your paths have &lt;CODE&gt;\&lt;/CODE&gt;, then you need to double them &lt;CODE&gt;\\&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I am not sure why you want all the &lt;CODE&gt;\W&lt;/CODE&gt; - nothing in the path names is being wildcarded and nothing is a special character to regex.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2014 17:51:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-in-transforms-conf-to-filter-events-to-null/m-p/153331#M43023</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-10-06T17:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to write regex in transforms.conf to filter events to null queue?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-in-transforms-conf-to-filter-events-to-null/m-p/153332#M43024</link>
      <description>&lt;P&gt;Thanks Iguinn, I will try that now. I thought you needed the \W to replace the / in the path name. If that is not needed, then great. &lt;/P&gt;

&lt;P&gt;I had tried using the regex as you initially stated, but it failed to work over the weekend and consequently, I ended up indexing 5M+ transactions over a 5 hour period. I'll try seperating each "filter" with brackets you suggest asI agree, they do help in in reading the REGEX statement.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2014 18:11:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-in-transforms-conf-to-filter-events-to-null/m-p/153332#M43024</guid>
      <dc:creator>andrewbeeber</dc:creator>
      <dc:date>2014-10-06T18:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to write regex in transforms.conf to filter events to null queue?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-in-transforms-conf-to-filter-events-to-null/m-p/153333#M43025</link>
      <description>&lt;P&gt;Weird the "/" or the "\W" does not seem to render properly...&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2014 19:05:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-regex-in-transforms-conf-to-filter-events-to-null/m-p/153333#M43025</guid>
      <dc:creator>andrewbeeber</dc:creator>
      <dc:date>2014-10-06T19:05:41Z</dc:date>
    </item>
  </channel>
</rss>

