<?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: How to extract fields in Heavy Forwarder? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591822#M10499</link>
    <description>&lt;P&gt;Hey could you please try this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="Mar 31 18:18:35 LUM-EVERE-PAFW-R8-17-T1 1,2022/03/31 18:18:35,015701001564,TRAFFIC,drop,2305,2022/03/31 18:18:35,10.81.13.68,34.240.162.53,0.0.0.0,0.0.0.0,prodedfl_access_1289,,,not-applicable,vsys4,prodedfl,prodcore,ae1.1512,,Syslog_Server,2022/03/31 18:18:35,0,1,60353,443,0,0,0x0,tcp,deny,66,66,0,1,2022/03/31 18:18:35,0,any,0,7022483376390954281,0x8000000000000000,10.0.0.0-10.255.255.255,Ireland,0,1,0,policy-deny,920,0,0,0,Production,LUM-EVERE-PAFW-R8-17-T1,from-policy,,,0,,0,,N/A,0,0,0,0,2d8c02f8-e86f-43cf-a459-01acdb26580a,0,0,,,,,,," 
| rex "\d{2}:\d{2}:\d{2},(?&amp;lt;src_ip&amp;gt;(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\,(?&amp;lt;dst_ip&amp;gt;(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\,(?:[^:\n]*:){2}\d+,\d+,\d+,(?&amp;lt;src_port&amp;gt;\d+)\,(?&amp;lt;dst_port&amp;gt;[^\,]+)(?:[^,\n]*,){5}(?&amp;lt;action&amp;gt;[^\,]+)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let me know if this helps!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mayur&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Mar 2022 17:13:14 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2022-03-31T17:13:14Z</dc:date>
    <item>
      <title>How to extract fields in Heavy Forwarder?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591818#M10497</link>
      <description>&lt;P&gt;Guys if you help me to extract fields from the raw events in props.conf in HF, I tried&amp;nbsp; EXTRACT command seems my regex is not ok or not sure what is the issue.&lt;/P&gt;&lt;P&gt;I want to extract field and give name to them.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regex I tried:&lt;/P&gt;&lt;P&gt;^(?:[^,\n]*,){7}(?&amp;lt;src_ip&amp;gt;[^,]+),(?&amp;lt;dst_ip&amp;gt;[^,]+)(?:[^:\n]*:){2}\d+,\d+,\d+,(?&amp;lt;src_port&amp;gt;\d+),(?&amp;lt;dst_port&amp;gt;\d+)(?:[^,\n]*,){5}(?&amp;lt;action&amp;gt;[^,]+)(?:[^,\n]*,){38}&lt;/P&gt;&lt;P&gt;Also,&lt;/P&gt;&lt;P&gt;^(?:[^,\n]*,){7}src_ip=(?&amp;lt;src_ip&amp;gt;[^,]+),dst_ip=(?&amp;lt;dst_ip&amp;gt;[^,]+)(?:[^:\n]*:){2}\d+,\d+,\d+,src_port=(?&amp;lt;src_port&amp;gt;\d+),dst_port=(?&amp;lt;dst_port&amp;gt;\d+)(?:[^,\n]*,){5}action=(?&amp;lt;action&amp;gt;[^,]+)(?:[^,\n]*,){38}&lt;/P&gt;&lt;P&gt;Sample log:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mar 31 18:18:35 LUM-EVERE-PAFW-R8-17-T1 1,2022/03/31 18:18:35,015701001564,TRAFFIC,drop,2305,2022/03/31 18:18:35,10.81.13.68,34.240.162.53,0.0.0.0,0.0.0.0,prodedfl_access_1289,,,not-applicable,vsys4,prodedfl,prodcore,ae1.1512,,Syslog_Server,2022/03/31 18:18:35,0,1,60353,443,0,0,0x0,tcp,deny,66,66,0,1,2022/03/31 18:18:35,0,any,0,7022483376390954281,0x8000000000000000,10.0.0.0-10.255.255.255,Ireland,0,1,0,policy-deny,920,0,0,0,Production,LUM-EVERE-PAFW-R8-17-T1,from-policy,,,0,,0,,N/A,0,0,0,0,2d8c02f8-e86f-43cf-a459-01acdb26580a,0,0,,,,,,,&lt;/P&gt;&lt;P&gt;Please help me to extract fields like src_ip, dst_ip, src_port, dst_port, action etc.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 16:30:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591818#M10497</guid>
      <dc:creator>R_M</dc:creator>
      <dc:date>2022-03-31T16:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields in Heavy Forwarder?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591821#M10498</link>
      <description>&lt;P&gt;Is that a single event or multiple events?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please identify the fields within the log (which IP address is source/dest, etc.).&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 17:01:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591821#M10498</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-03-31T17:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields in Heavy Forwarder?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591822#M10499</link>
      <description>&lt;P&gt;Hey could you please try this :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="Mar 31 18:18:35 LUM-EVERE-PAFW-R8-17-T1 1,2022/03/31 18:18:35,015701001564,TRAFFIC,drop,2305,2022/03/31 18:18:35,10.81.13.68,34.240.162.53,0.0.0.0,0.0.0.0,prodedfl_access_1289,,,not-applicable,vsys4,prodedfl,prodcore,ae1.1512,,Syslog_Server,2022/03/31 18:18:35,0,1,60353,443,0,0,0x0,tcp,deny,66,66,0,1,2022/03/31 18:18:35,0,any,0,7022483376390954281,0x8000000000000000,10.0.0.0-10.255.255.255,Ireland,0,1,0,policy-deny,920,0,0,0,Production,LUM-EVERE-PAFW-R8-17-T1,from-policy,,,0,,0,,N/A,0,0,0,0,2d8c02f8-e86f-43cf-a459-01acdb26580a,0,0,,,,,,," 
| rex "\d{2}:\d{2}:\d{2},(?&amp;lt;src_ip&amp;gt;(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\,(?&amp;lt;dst_ip&amp;gt;(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\,(?:[^:\n]*:){2}\d+,\d+,\d+,(?&amp;lt;src_port&amp;gt;\d+)\,(?&amp;lt;dst_port&amp;gt;[^\,]+)(?:[^,\n]*,){5}(?&amp;lt;action&amp;gt;[^\,]+)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let me know if this helps!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mayur&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 17:13:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591822#M10499</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2022-03-31T17:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields in Heavy Forwarder?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591826#M10500</link>
      <description>&lt;P&gt;Can I apply this regex in props.conf under EXTRACT commmand, also&amp;nbsp; I also want to give name to the field, example: src_ip:&amp;nbsp;10.82.69.5&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 17:33:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591826#M10500</guid>
      <dc:creator>R_M</dc:creator>
      <dc:date>2022-03-31T17:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields in Heavy Forwarder?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591831#M10501</link>
      <description>&lt;P&gt;yes you can use this regex in props.conf.&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;if you want to add a search time field extraction within props.conf, just use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;EXTRACT&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[your-sourcetype]    
EXTRACT-&amp;lt;class&amp;gt; = [&amp;lt;regex&amp;gt;|&amp;lt;regex&amp;gt; in &amp;lt;src_field&amp;gt;]
    * Used to create extracted fields (search-time field extractions) that do
      not reference transforms.conf stanzas.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for reference see :&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.2.1/Admin/Propsconf" target="_blank" rel="nofollow noopener noreferrer"&gt;http://docs.splunk.com/Documentation/Splunk/8.2.5/Admin/Propsconf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please keep in mind that this will require a refresh/debug=&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;http[s]://[splunkweb hostname]:[splunkweb port]/debug/refresh&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 31 Mar 2022 17:55:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591831#M10501</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2022-03-31T17:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields in Heavy Forwarder?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591899#M10502</link>
      <description>&lt;P&gt;Please help me how I can apply it, if you can share command&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 05:59:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591899#M10502</guid>
      <dc:creator>R_M</dc:creator>
      <dc:date>2022-04-01T05:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields in Heavy Forwarder?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591904#M10503</link>
      <description>&lt;P&gt;Wait a minute. EXTRACT is for search-time extractions. You don't use it on HF since you don't search on HF.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 06:24:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591904#M10503</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-04-01T06:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields in Heavy Forwarder?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591958#M10504</link>
      <description>&lt;P&gt;you need to use this regex on search head&amp;nbsp;&lt;/P&gt;&lt;P&gt;go to&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Settings&amp;nbsp;» Fields&amp;nbsp;&lt;/SPAN&gt;» Field extractions&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;»&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Add new&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Destination App: &amp;lt;your_app&amp;gt;
Name: &amp;lt;name&amp;gt;
Apply to: choose sourcetype :  named &amp;lt;your_sourcetype&amp;gt;
Type: Inline
Extraction/Transform: \d{2}:\d{2}:\d{2},(?&amp;lt;src_ip&amp;gt;(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\,(?&amp;lt;dst_ip&amp;gt;(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\,(?:[^:\n]*:){2}\d+,\d+,\d+,(?&amp;lt;src_port&amp;gt;\d+)\,(?&amp;lt;dst_port&amp;gt;[^\,]+)(?:[^,\n]*,){5}(?&amp;lt;action&amp;gt;[^\,]+)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;let me know if this helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Apr 2022 14:51:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-extract-fields-in-Heavy-Forwarder/m-p/591958#M10504</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2022-04-01T14:51:38Z</dc:date>
    </item>
  </channel>
</rss>

