<?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: need help with regex for Transforms.conf in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/need-help-with-regex-for-Transforms-conf/m-p/67360#M16844</link>
    <description>&lt;P&gt;I'm not sure your regex syntax is correct.  The "[" and "]" are special chars.  You might try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull] 
REGEX=src=172\.23\.8\.50 
DEST_KEY=queue 
FORMAT=nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also you need to refer to this transforms.conf entry from somewhere inside of props.conf.    Something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mysourcetype]
TRANSFORMS-routing=setnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There's good examples of this at:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/4.1.5/Admin/Routeandfilterdata" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/4.1.5/Admin/Routeandfilterdata&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 09 Oct 2010 01:16:24 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2010-10-09T01:16:24Z</dc:date>
    <item>
      <title>need help with regex for Transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-help-with-regex-for-Transforms-conf/m-p/67359#M16843</link>
      <description>&lt;P&gt;I am new to both Splunk and REGEX.   I am trying to filter out syslog data from a single src address.&lt;/P&gt;

&lt;P&gt;I have the following in my Transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull]
REGEX = \[src=172.23.8.50\]
DEST_KEY = queue
FORMAT = nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My data looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Oct  8 13:08:46 10.103.236.21 SSG550: NetScreen device_id=SSG550  [Root]system-notification-00257(traffic): start_time="2010-10-08 13:08:46" duration=0 policy_id=225 service=tcp/port:7777 proto=6 src zone=DMZ-8 dst zone=WAN action=Permit sent=0 rcvd=0 src=172.23.8.50 dst=172.20.15.22 src_port=15120 dst_port=7777 src-xlated ip=172.23.8.50 port=15120 dst-xlated ip=172.20.15.22 port=7777 session_id=250914
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Isn't there some way I can select these records based on the field "src"?     If not,  can someone tell me why my regex above is not working.&lt;/P&gt;

&lt;P&gt;Thanks again for helping a newbee out.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Oct 2010 01:10:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-help-with-regex-for-Transforms-conf/m-p/67359#M16843</guid>
      <dc:creator>rhuss</dc:creator>
      <dc:date>2010-10-09T01:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: need help with regex for Transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-help-with-regex-for-Transforms-conf/m-p/67360#M16844</link>
      <description>&lt;P&gt;I'm not sure your regex syntax is correct.  The "[" and "]" are special chars.  You might try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[setnull] 
REGEX=src=172\.23\.8\.50 
DEST_KEY=queue 
FORMAT=nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also you need to refer to this transforms.conf entry from somewhere inside of props.conf.    Something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mysourcetype]
TRANSFORMS-routing=setnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There's good examples of this at:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.splunk.com/base/Documentation/4.1.5/Admin/Routeandfilterdata" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/4.1.5/Admin/Routeandfilterdata&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Oct 2010 01:16:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-help-with-regex-for-Transforms-conf/m-p/67360#M16844</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2010-10-09T01:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: need help with regex for Transforms.conf</title>
      <link>https://community.splunk.com/t5/Splunk-Search/need-help-with-regex-for-Transforms-conf/m-p/67361#M16845</link>
      <description>&lt;P&gt;If it helps at all, I found this video which explains adding lines to props.conf and transforms.conf (towards the end, first half or so is about the rex search command).&lt;/P&gt;

&lt;P&gt;&lt;A href="http://blogs.splunk.com/2008/10/22/all-my-regexs-live-in-texas/" rel="nofollow"&gt;http://blogs.splunk.com/2008/10/22/all-my-regexs-live-in-texas/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Oct 2010 03:09:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/need-help-with-regex-for-Transforms-conf/m-p/67361#M16845</guid>
      <dc:creator>cfortune</dc:creator>
      <dc:date>2010-10-09T03:09:33Z</dc:date>
    </item>
  </channel>
</rss>

