<?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: What is the best way to extract data when my log has with comma separated fields and the field-value pairs are separated by a colon? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-extract-data-when-my-log-has-with-comma/m-p/282792#M85420</link>
    <description>&lt;P&gt;Have you had a look at DELIMS in transforms.conf? Here is something that should work;&lt;/P&gt;

&lt;P&gt;[comma_colon]&lt;BR /&gt;
DELIMS = ",", ":"&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2017 21:40:16 GMT</pubDate>
    <dc:creator>karlbosanquet</dc:creator>
    <dc:date>2017-02-08T21:40:16Z</dc:date>
    <item>
      <title>What is the best way to extract data when my log has with comma separated fields and the field-value pairs are separated by a colon?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-extract-data-when-my-log-has-with-comma/m-p/282791#M85419</link>
      <description>&lt;P&gt;How would I go about parsing out/extracting the field data for the following log format?&lt;/P&gt;

&lt;P&gt;"fieldname1":"fieldvalue1","timestamp":"2017-02-07 14:19:54.166","ip_address":"3.3.3.3","user_id":"USER1"&lt;BR /&gt;
"fieldname1":"fieldvalue1","timestamp":"2017-02-07 14:19:52.395","fieldname2":"fieldvalue2","user_id":"USER2"&lt;BR /&gt;
"fieldname1":"fieldvalue1","timestamp":"2017-02-07 14:19:50.316","ip_address":"8.8.8.8","fieldname2":"fieldvalue2"&lt;/P&gt;

&lt;P&gt;Not all lines of logs will contain all the same fields, but field names are constant.  The fields are always comma separated and then in "field":"value" pairs.  Currently, I have separate field extractions for each interesting field such as:&lt;/P&gt;

&lt;P&gt;\"fieldname1\":\"(?P[a-zA-z]*)&lt;/P&gt;

&lt;P&gt;Is this the right way to do this or is there an easier or more proper method?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:45:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-extract-data-when-my-log-has-with-comma/m-p/282791#M85419</guid>
      <dc:creator>nunyabizness123</dc:creator>
      <dc:date>2020-09-29T12:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to extract data when my log has with comma separated fields and the field-value pairs are separated by a colon?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-extract-data-when-my-log-has-with-comma/m-p/282792#M85420</link>
      <description>&lt;P&gt;Have you had a look at DELIMS in transforms.conf? Here is something that should work;&lt;/P&gt;

&lt;P&gt;[comma_colon]&lt;BR /&gt;
DELIMS = ",", ":"&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2017 21:40:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-extract-data-when-my-log-has-with-comma/m-p/282792#M85420</guid>
      <dc:creator>karlbosanquet</dc:creator>
      <dc:date>2017-02-08T21:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: What is the best way to extract data when my log has with comma separated fields and the field-value pairs are separated by a colon?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-extract-data-when-my-log-has-with-comma/m-p/282793#M85421</link>
      <description>&lt;P&gt;@nunyabizness123 - Did the answer provided by karlbosanquet help provide a working solution to your question? If yes, please don't forget to resolve this post by clicking "Accept". If no, please leave a comment with more feedback. Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 11 Mar 2017 18:44:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-best-way-to-extract-data-when-my-log-has-with-comma/m-p/282793#M85421</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2017-03-11T18:44:34Z</dc:date>
    </item>
  </channel>
</rss>

