<?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 [Forwarder] extract field from flow tcp 514 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/562855#M196113</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Y2IQFc"&gt;I have a data stream on the forwarder, streaming on the 514. the data is correctly indexed. But I would like to extract/build some fields from the _raw.&lt;BR /&gt;In search head, i try with rex field. it works but it's too long for user.&lt;BR /&gt;So, i want to do it on forwarder before indexation.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;_raw: &amp;lt;150&amp;gt; 2021-06-01: 00: 05: 12 localhost blue car=porsche,959 .....&lt;BR /&gt;i want build this fields for begining:&lt;BR /&gt;carbrand : porsche&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;inputs.conf&lt;BR /&gt;[tcp://my_hostname_client:514]&lt;BR /&gt;index = car_park&lt;BR /&gt;sourcetype = sale&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;First WAY:&lt;/U&gt; only in props.conf&lt;BR /&gt;[sale] # i try something&lt;BR /&gt;EXTRACT-testsale = ^.*car=(?&amp;lt;carbrand&amp;gt;.*)\,$&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;Second WAY: props + transforms&lt;/U&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Y2IQFc"&gt;In props.conf&lt;BR /&gt;[sale]&lt;BR /&gt;REPORT-testsale = extract-cardata&lt;BR /&gt;&lt;BR /&gt;And in transforms.conf&lt;BR /&gt;[extract-cardata]&lt;BR /&gt;REGEX = ^.*car=(.*)\,$&lt;BR /&gt;FORMAT = carbrand::$1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So, is-it possible to extract field in the _raw on the forwarder from&amp;nbsp; tcp flow 514 ?&lt;BR /&gt;If yes, where are my mistakes in my conf?&lt;BR /&gt;&lt;BR /&gt;Thks for your returns and help.&lt;BR /&gt;Best regards.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Aug 2021 06:48:45 GMT</pubDate>
    <dc:creator>SuperMisterT</dc:creator>
    <dc:date>2021-08-11T06:48:45Z</dc:date>
    <item>
      <title>[Forwarder] extract field from flow tcp 514</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/562855#M196113</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Y2IQFc"&gt;I have a data stream on the forwarder, streaming on the 514. the data is correctly indexed. But I would like to extract/build some fields from the _raw.&lt;BR /&gt;In search head, i try with rex field. it works but it's too long for user.&lt;BR /&gt;So, i want to do it on forwarder before indexation.&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;_raw: &amp;lt;150&amp;gt; 2021-06-01: 00: 05: 12 localhost blue car=porsche,959 .....&lt;BR /&gt;i want build this fields for begining:&lt;BR /&gt;carbrand : porsche&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;inputs.conf&lt;BR /&gt;[tcp://my_hostname_client:514]&lt;BR /&gt;index = car_park&lt;BR /&gt;sourcetype = sale&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;First WAY:&lt;/U&gt; only in props.conf&lt;BR /&gt;[sale] # i try something&lt;BR /&gt;EXTRACT-testsale = ^.*car=(?&amp;lt;carbrand&amp;gt;.*)\,$&lt;BR /&gt;&lt;BR /&gt;&lt;U&gt;Second WAY: props + transforms&lt;/U&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Y2IQFc"&gt;In props.conf&lt;BR /&gt;[sale]&lt;BR /&gt;REPORT-testsale = extract-cardata&lt;BR /&gt;&lt;BR /&gt;And in transforms.conf&lt;BR /&gt;[extract-cardata]&lt;BR /&gt;REGEX = ^.*car=(.*)\,$&lt;BR /&gt;FORMAT = carbrand::$1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So, is-it possible to extract field in the _raw on the forwarder from&amp;nbsp; tcp flow 514 ?&lt;BR /&gt;If yes, where are my mistakes in my conf?&lt;BR /&gt;&lt;BR /&gt;Thks for your returns and help.&lt;BR /&gt;Best regards.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 06:48:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/562855#M196113</guid>
      <dc:creator>SuperMisterT</dc:creator>
      <dc:date>2021-08-11T06:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: [Forwarder] extract field from flow tcp 514</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/562888#M196128</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235238"&gt;@SuperMisterT&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your rex is not extracting as i have tested you can replace it with following , you can test your rex using this link -&amp;nbsp;&lt;A href="https://regex101.com/r/lz6C69/1" target="_blank"&gt;https://regex101.com/r/lz6C69/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And i noticed car= is KV pair splunk shall Auto extract , have you tried searching in verbose mode? Otherwise try below.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[sale] # i try something
EXTRACT-testsale = ^.*car=(?&amp;lt;carbrand&amp;gt;[^,]+)&lt;/LI-CODE&gt;&lt;P&gt;First WAY: props conf&amp;nbsp; should work fine however you should deploy it your SH as EXTRACT is search-time conf.&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 09:40:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/562888#M196128</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-08-11T09:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: [Forwarder] extract field from flow tcp 514</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/562891#M196131</link>
      <description>&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;In fact my example sample wasn't my real data.&lt;/P&gt;&lt;P&gt;My _raw is like a long string and i try to extract some parts receive by udp 514.&lt;/P&gt;&lt;P&gt;I want extract and build a custom field at index time (so on the forwarder).&lt;/P&gt;&lt;P&gt;i follow this doc &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.1/Data/Configureindex-timefieldextraction" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.1/Data/Configureindex-timefieldextraction&lt;/A&gt; it doesnt work.&lt;/P&gt;&lt;P&gt;I try a simple rex:&lt;/P&gt;&lt;P&gt;REGEX = (\d)&lt;/P&gt;&lt;P&gt;FORMAT = my_test::"$1"&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Damned&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 09:48:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/562891#M196131</guid>
      <dc:creator>SuperMisterT</dc:creator>
      <dc:date>2021-08-11T09:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: [Forwarder] extract field from flow tcp 514</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/562894#M196132</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235238"&gt;@SuperMisterT&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Deploy following conf to indexer/Heavy-forwarder replace the regex that i have placed with working one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#prop. conf
[sales]
TRANSFORM-extract = extract-car

#transforms.conf
[extract-car]
REGEX = ^.*car=(?&amp;lt;carbrand&amp;gt;[^,]+)
FORMAT = carbrand::$1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Aug 2021 10:02:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/562894#M196132</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-08-11T10:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: [Forwarder] extract field from flow tcp 514</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563029#M196158</link>
      <description>&lt;P&gt;Sorry,&lt;/P&gt;&lt;P&gt;I try to place this syntaxe:&lt;/P&gt;&lt;P&gt;#prop. conf&lt;BR /&gt;[sales]&lt;BR /&gt;TRANSFORMS-extract = extract-car # you wrote a typo &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;#transforms.conf&lt;BR /&gt;[extract-car]&lt;BR /&gt;REGEX = (?&amp;lt;carbrand&amp;gt;\d) # very simple regexp just to try new field's creation (the string has some digits)&lt;BR /&gt;FORMAT = carbrand::$1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I delete data in index and sourcetype.&lt;BR /&gt;I restart splunkd on the forwarder. Done.&lt;/P&gt;&lt;P&gt;In searchhead,&lt;STRONG&gt; i've some events&lt;/STRONG&gt; but the new field doesn't appaer. No error in log.&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 07:21:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563029#M196158</guid>
      <dc:creator>SuperMisterT</dc:creator>
      <dc:date>2021-08-12T07:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: [Forwarder] extract field from flow tcp 514</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563049#M196169</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I think that you should add also WRITE_META = true to transforms.conf. Also you should add fields.conf to your SH nodes.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.1/Data/Configureindex-timefieldextraction" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.1/Data/Configureindex-timefieldextraction&lt;/A&gt;&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 10:03:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563049#M196169</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-08-12T10:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: [Forwarder] extract field from flow tcp 514</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563053#M196170</link>
      <description>&lt;P&gt;Can you try this make sure your regex works, you can try using &amp;lt;your_search&amp;gt; | rex "(?&amp;lt;carbrand&amp;gt;\d)"&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;#prop. conf deploy to HF
[sales]
TRANSFORMS-extract = extract-car

#transforms.conf deploy to HF
[extract-car]
REGEX = (?&amp;lt;carbrand&amp;gt;\d)
FORMAT = carbrand::$1
WRITE_META = true

#fields.conf deploy to search-head in distributed set-up
[carbrand]
INDEXED = true&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 10:27:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563053#M196170</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-08-12T10:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: [Forwarder] extract field from flow tcp 514</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563061#M196174</link>
      <description>&lt;P&gt;Right, so i apply this code on the FW and SH.&lt;/P&gt;&lt;P&gt;But it doesnt work. The conf's indexer clustering simple.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try on SH:&lt;/P&gt;&lt;P&gt;index = xyz sourcetype = test001 | rex field=_raw&amp;nbsp; "(?&amp;lt;carbrand&amp;gt;\d)"&lt;/P&gt;&lt;P&gt;It works: i've a new field in "Interesting fields" &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, with props and transforms on FW and fields on SH, it doesn''t work. I can't create a new field on TCP 514 event at index time....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;question: during an indexation (just before) of tcp event 514, _raw contains data&amp;nbsp; or not ?&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 12:14:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563061#M196174</guid>
      <dc:creator>SuperMisterT</dc:creator>
      <dc:date>2021-08-12T12:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: [Forwarder] extract field from flow tcp 514</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563068#M196176</link>
      <description>&lt;P&gt;I add on SH this key. But no effect.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 12:54:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563068#M196176</guid>
      <dc:creator>SuperMisterT</dc:creator>
      <dc:date>2021-08-12T12:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: [Forwarder] extract field from flow tcp 514</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563140#M196209</link>
      <description>&lt;P&gt;Hİ&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235238"&gt;@SuperMisterT&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You mean FW as Universal Forwarder or Heavy Forwarder? If it is Universal Forwarder, you should put these props.conf and transforms.conf settings to indexers.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 04:44:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563140#M196209</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2021-08-13T04:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: [Forwarder] extract field from flow tcp 514</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563154#M196217</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;SOLVED&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I build an instance HeavyForwarder instead of Universal.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;It works only on HF.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":clapping_hands:"&gt;👏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 07:45:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563154#M196217</guid>
      <dc:creator>SuperMisterT</dc:creator>
      <dc:date>2021-08-13T07:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: [Forwarder] extract field from flow tcp 514</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563159#M196219</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235238"&gt;@SuperMisterT&lt;/a&gt;&amp;nbsp;yes as i mentioned in conf comments where to deploy what it works on HF or indexer..&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 08:14:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Forwarder-extract-field-from-flow-tcp-514/m-p/563159#M196219</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-08-13T08:14:32Z</dc:date>
    </item>
  </channel>
</rss>

