<?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 Can't Extract Multiple Custom Fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-t-Extract-Multiple-Custom-Fields/m-p/51683#M12531</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to extract each of the 16 values following the "Latency:" string into 16 separate fields and then export the fields to a CSV file.  The default extraction doesn't seem to extract them, so I used IFX to generate a Latency field, but that contained all 16 values in a single string, again, not what I need.&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;Jul 25 09:53:33 datapower xi50-opsSyslog [latency][info] mpgw(opsSftpExmFrontGateway): trans(942496)[10.1.131.205]: Latency:   0   1   0   0   0   0   0   1   1   1  13  13   0   1   0   1 [sftp://[::]:2060/dropbox;type=d]&lt;/P&gt;

&lt;P&gt;Jul 25 09:55:30 datapower xi50-opsSyslog [latency][info] mpgw(opsSftpExmFrontGateway): trans(942512)[10.1.131.205]: Latency:   0  16   0 68259 68259   0   0 68260 68260 68260 68260 68260   0 68260   0  16 [sftp://[::]:2060/dropbox/test1.dat]&lt;/P&gt;

&lt;P&gt;Jul 25 09:56:39 datapower xi50-opsSyslog [latency][info] mpgw(opsSftpExmFrontGateway): trans(944752)[10.1.131.205]: Latency:   0   1   0   0   0   0   0   1   1   1  13  13   0   1   0   1 [sftp://[::]:2060/dropbox/;type=d]&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;I'm struggling with breaking out the 16 individual fields.  Any suggestions would be greatly appreciated.&lt;/P&gt;</description>
    <pubDate>Mon, 01 Aug 2011 21:32:05 GMT</pubDate>
    <dc:creator>mxsullivan</dc:creator>
    <dc:date>2011-08-01T21:32:05Z</dc:date>
    <item>
      <title>Can't Extract Multiple Custom Fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-t-Extract-Multiple-Custom-Fields/m-p/51683#M12531</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to extract each of the 16 values following the "Latency:" string into 16 separate fields and then export the fields to a CSV file.  The default extraction doesn't seem to extract them, so I used IFX to generate a Latency field, but that contained all 16 values in a single string, again, not what I need.&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;Jul 25 09:53:33 datapower xi50-opsSyslog [latency][info] mpgw(opsSftpExmFrontGateway): trans(942496)[10.1.131.205]: Latency:   0   1   0   0   0   0   0   1   1   1  13  13   0   1   0   1 [sftp://[::]:2060/dropbox;type=d]&lt;/P&gt;

&lt;P&gt;Jul 25 09:55:30 datapower xi50-opsSyslog [latency][info] mpgw(opsSftpExmFrontGateway): trans(942512)[10.1.131.205]: Latency:   0  16   0 68259 68259   0   0 68260 68260 68260 68260 68260   0 68260   0  16 [sftp://[::]:2060/dropbox/test1.dat]&lt;/P&gt;

&lt;P&gt;Jul 25 09:56:39 datapower xi50-opsSyslog [latency][info] mpgw(opsSftpExmFrontGateway): trans(944752)[10.1.131.205]: Latency:   0   1   0   0   0   0   0   1   1   1  13  13   0   1   0   1 [sftp://[::]:2060/dropbox/;type=d]&lt;/P&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;I'm struggling with breaking out the 16 individual fields.  Any suggestions would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2011 21:32:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-t-Extract-Multiple-Custom-Fields/m-p/51683#M12531</guid>
      <dc:creator>mxsullivan</dc:creator>
      <dc:date>2011-08-01T21:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can't Extract Multiple Custom Fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-t-Extract-Multiple-Custom-Fields/m-p/51684#M12532</link>
      <description>&lt;P&gt;What I would probably do is, in a search string, add:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "Latency: (?&amp;lt;Field1&amp;gt;\d*) (?&amp;lt;Field2&amp;gt;\d*) (?&amp;lt;Field3&amp;gt;\d*) (?&amp;lt;Field4&amp;gt;\d*) (?&amp;lt;Field5&amp;gt;\d*) (?&amp;lt;Field6&amp;gt;\d*) (?&amp;lt;Field7&amp;gt;\d*) (?&amp;lt;Field8&amp;gt;\d*) (?&amp;lt;Field9&amp;gt;\d*) (?&amp;lt;Field10&amp;gt;\d*) (?&amp;lt;Field11&amp;gt;\d*) (?&amp;lt;Field12&amp;gt;\d*) (?&amp;lt;Field13&amp;gt;\d*) (?&amp;lt;Field14&amp;gt;\d*) (?&amp;lt;Field15&amp;gt;\d*) (?&amp;lt;Field16&amp;gt;\d*)" | table Field1 Field2 Field3 Field4 Field5 Field6 Field7 Field8 Field9 Field10 Field11 Field12 Field13 Field14 Field15 Field16 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can also put the first part in your props.conf, via:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[SourceType]
EXTRACT-SixteenFields = Latency: (?&amp;lt;Field1&amp;gt;\d*) (?&amp;lt;Field2&amp;gt;\d*) (?&amp;lt;Field3&amp;gt;\d*) (?&amp;lt;Field4&amp;gt;\d*) (?&amp;lt;Field5&amp;gt;\d*) (?&amp;lt;Field6&amp;gt;\d*) (?&amp;lt;Field7&amp;gt;\d*) (?&amp;lt;Field8&amp;gt;\d*) (?&amp;lt;Field9&amp;gt;\d*) (?&amp;lt;Field10&amp;gt;\d*) (?&amp;lt;Field11&amp;gt;\d*) (?&amp;lt;Field12&amp;gt;\d*) (?&amp;lt;Field13&amp;gt;\d*) (?&amp;lt;Field14&amp;gt;\d*) (?&amp;lt;Field15&amp;gt;\d*) (?&amp;lt;Field16&amp;gt;\d*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And then it will be automatically extracted for you.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2011 23:45:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-t-Extract-Multiple-Custom-Fields/m-p/51684#M12532</guid>
      <dc:creator>David</dc:creator>
      <dc:date>2011-08-01T23:45:59Z</dc:date>
    </item>
  </channel>
</rss>

