<?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 How to extract Docker Daemon json data into  proper fields in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-Docker-Daemon-json-data-into-proper-fields/m-p/462445#M79804</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;the below is the one event in splunk. How to extract MSG, PromotionId, requestId, status, command fields &lt;/P&gt;

&lt;P&gt;{ [-]&lt;BR /&gt;
   log: 2019-10-15 11:56:47.047     INFO  paXXX-command-service:ppe [XXXXXX,baff9b4ace879603,baff9b4ace879603] 23 --- [cb-computations-10] c.t.a.p.d.c.CommandStatusHandler         : MSG=successfully saved command status, command=CreateXXXX, step=handle, commandStatusId=a570668b-eaa9-44ed-ac90-ac1de811e14a, promotionId=null, status=success, requestId=c5d33666-ecce-4fb1-967c-a71c5621e79e&lt;/P&gt;

&lt;P&gt;stream: stdout&lt;BR /&gt;
   time: 2019-10-15T11:56:47.0473056Z&lt;BR /&gt;
}&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2019 09:17:47 GMT</pubDate>
    <dc:creator>kvnvkumar</dc:creator>
    <dc:date>2019-10-17T09:17:47Z</dc:date>
    <item>
      <title>How to extract Docker Daemon json data into  proper fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-Docker-Daemon-json-data-into-proper-fields/m-p/462445#M79804</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;the below is the one event in splunk. How to extract MSG, PromotionId, requestId, status, command fields &lt;/P&gt;

&lt;P&gt;{ [-]&lt;BR /&gt;
   log: 2019-10-15 11:56:47.047     INFO  paXXX-command-service:ppe [XXXXXX,baff9b4ace879603,baff9b4ace879603] 23 --- [cb-computations-10] c.t.a.p.d.c.CommandStatusHandler         : MSG=successfully saved command status, command=CreateXXXX, step=handle, commandStatusId=a570668b-eaa9-44ed-ac90-ac1de811e14a, promotionId=null, status=success, requestId=c5d33666-ecce-4fb1-967c-a71c5621e79e&lt;/P&gt;

&lt;P&gt;stream: stdout&lt;BR /&gt;
   time: 2019-10-15T11:56:47.0473056Z&lt;BR /&gt;
}&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 09:17:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-Docker-Daemon-json-data-into-proper-fields/m-p/462445#M79804</guid>
      <dc:creator>kvnvkumar</dc:creator>
      <dc:date>2019-10-17T09:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract Docker Daemon json data into  proper fields</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-Docker-Daemon-json-data-into-proper-fields/m-p/462446#M79805</link>
      <description>&lt;P&gt;Hello @kvnvkumar ,&lt;/P&gt;

&lt;P&gt;First use spath to extract the log field from the event, and then use rex to extract the fields.&lt;/P&gt;

&lt;P&gt;Please find below a working example.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="{\"log\": \"2019-10-15 11:56:47.047 INFO paXXX-command-service:ppe [XXXXXX,baff9b4ace879603,baff9b4ace879603] 23 --- [cb-computations-10] c.t.a.p.d.c.CommandStatusHandler : MSG=successfully saved command status, command=CreateXXXX, step=handle, commandStatusId=a570668b-eaa9-44ed-ac90-ac1de811e14a, promotionId=null, status=success, requestId=c5d33666-ecce-4fb1-967c-a71c5621e79e\",\"stream\": \"stdout\",\"time\": \"2019-10-15T11:56:47.0473056Z\"}"
| spath
| rex field=log "MSG=(?&amp;lt;MSG&amp;gt;[A-Aa-z ]+)"
| rex field=log "promotionId=(?&amp;lt;PromotionId&amp;gt;[A-Za-z0-9 ]+),"
| rex field=log "requestId=(?&amp;lt;requestId&amp;gt;[A-Za-z0-9 -]+)"
| rex field=log "command=(?&amp;lt;command&amp;gt;[A-Za-z0-9 -]+),"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Nov 2019 07:20:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-Docker-Daemon-json-data-into-proper-fields/m-p/462446#M79805</guid>
      <dc:creator>poete</dc:creator>
      <dc:date>2019-11-07T07:20:34Z</dc:date>
    </item>
  </channel>
</rss>

