<?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 transforms.conf multiple $1 assignments in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/transforms-conf-multiple-1-assignments/m-p/70530#M14346</link>
    <description>&lt;P&gt;Folks,&lt;/P&gt;

&lt;P&gt;Running Splunk v4.3 and trying to understand this phenomenon. In transforms.conf, something like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[transport]&lt;BR /&gt;
REGEX = (TCP|tcp|UDP|udp|ICMP|icmp)&lt;BR /&gt;
FORMAT = transport::$1 protocol::$1&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Seems to only create the latter field (protocol), transport doesn't seem to exist. Is there any way i can make Splunk create both fields?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Feb 2012 10:06:35 GMT</pubDate>
    <dc:creator>Splunker</dc:creator>
    <dc:date>2012-02-13T10:06:35Z</dc:date>
    <item>
      <title>transforms.conf multiple $1 assignments</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/transforms-conf-multiple-1-assignments/m-p/70530#M14346</link>
      <description>&lt;P&gt;Folks,&lt;/P&gt;

&lt;P&gt;Running Splunk v4.3 and trying to understand this phenomenon. In transforms.conf, something like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[transport]&lt;BR /&gt;
REGEX = (TCP|tcp|UDP|udp|ICMP|icmp)&lt;BR /&gt;
FORMAT = transport::$1 protocol::$1&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Seems to only create the latter field (protocol), transport doesn't seem to exist. Is there any way i can make Splunk create both fields?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2012 10:06:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/transforms-conf-multiple-1-assignments/m-p/70530#M14346</guid>
      <dc:creator>Splunker</dc:creator>
      <dc:date>2012-02-13T10:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: transforms.conf multiple $1 assignments</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/transforms-conf-multiple-1-assignments/m-p/70531#M14347</link>
      <description>&lt;P&gt;This is really going to depend on which fields show up first in your event. I'm going to assume that transport shows up first followed by protocol. The reason your current configuration isn't working is because you need to setup grouping in your regex. Try doing this instead.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[transport]
REGEX = (TCP|tcp|UDP|udp|ICMP|icmp)|(TCP|tcp|UDP|udp|ICMP|icmp)
FORMAT = transport::$1 protocol::$2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if this works. &lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2012 15:31:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/transforms-conf-multiple-1-assignments/m-p/70531#M14347</guid>
      <dc:creator>RicoSuave</dc:creator>
      <dc:date>2012-02-13T15:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: transforms.conf multiple $1 assignments</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/transforms-conf-multiple-1-assignments/m-p/70532#M14348</link>
      <description>&lt;P&gt;Hey Joetron,&lt;/P&gt;

&lt;P&gt;That should technically work for single-captures, but i realised multi-captures would get much more difficult. I opted to make the duplicate captures field-aliases instead.&lt;/P&gt;

&lt;P&gt;So transport::$1 but protocol is an alias to transport.&lt;/P&gt;

&lt;P&gt;The above was defined in an app on SplunkBase, which made me wonder if there was a way to do this, but now i think it's just a bug.. Will award you the points as your answer is correct &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Feb 2012 07:10:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/transforms-conf-multiple-1-assignments/m-p/70532#M14348</guid>
      <dc:creator>Splunker</dc:creator>
      <dc:date>2012-02-19T07:10:25Z</dc:date>
    </item>
  </channel>
</rss>

