<?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 Basic Key Value extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Basic-Key-Value-extraction/m-p/354933#M170140</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I receive message like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; topic="Sniffer" message=""timestamp"="1524387631351","process"="com.x.android.apps","packageName"="com.google.android.gms","type"="URL","URL"="https://x.x.com/UploadConfigurationService/UnitUploadSettings/x071x?clientId=xx-mobile""
topic="Sniffer" message=""timestamp"="1524387779884","process"="com.google.android.gms","packageName"="com.google.android.gms","type"="URL","URL"="https://android.clients.google.com/c2dm/register3""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and I need to extract all key/value from "message=" without knowing the fields, I have only the syntaxe KV so here I would like to have :&lt;/P&gt;

&lt;P&gt;process : com.x.android.apps&lt;BR /&gt;
packageName : com.google.android.gms&lt;BR /&gt;
...&lt;/P&gt;

&lt;P&gt;I try without sucess :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=devices Sniffer  |  rex field=_raw ".*message=\"(?&amp;lt;message&amp;gt;.*)\"" |   extract pairdelim="," kvdelim="=" |table  *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any idea ?&lt;/P&gt;

&lt;P&gt;Thanks for your help &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 22 Apr 2018 09:13:23 GMT</pubDate>
    <dc:creator>erichard</dc:creator>
    <dc:date>2018-04-22T09:13:23Z</dc:date>
    <item>
      <title>Basic Key Value extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Basic-Key-Value-extraction/m-p/354933#M170140</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I receive message like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; topic="Sniffer" message=""timestamp"="1524387631351","process"="com.x.android.apps","packageName"="com.google.android.gms","type"="URL","URL"="https://x.x.com/UploadConfigurationService/UnitUploadSettings/x071x?clientId=xx-mobile""
topic="Sniffer" message=""timestamp"="1524387779884","process"="com.google.android.gms","packageName"="com.google.android.gms","type"="URL","URL"="https://android.clients.google.com/c2dm/register3""
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and I need to extract all key/value from "message=" without knowing the fields, I have only the syntaxe KV so here I would like to have :&lt;/P&gt;

&lt;P&gt;process : com.x.android.apps&lt;BR /&gt;
packageName : com.google.android.gms&lt;BR /&gt;
...&lt;/P&gt;

&lt;P&gt;I try without sucess :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=devices Sniffer  |  rex field=_raw ".*message=\"(?&amp;lt;message&amp;gt;.*)\"" |   extract pairdelim="," kvdelim="=" |table  *
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any idea ?&lt;/P&gt;

&lt;P&gt;Thanks for your help &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Apr 2018 09:13:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Basic-Key-Value-extraction/m-p/354933#M170140</guid>
      <dc:creator>erichard</dc:creator>
      <dc:date>2018-04-22T09:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Basic Key Value extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Basic-Key-Value-extraction/m-p/354934#M170141</link>
      <description>&lt;P&gt;@erichard, try the following run anywhere search based on sample data provided. (Commands from &lt;CODE&gt;| makeresults&lt;/CODE&gt; to &lt;CODE&gt;| rename data as _raw&lt;/CODE&gt; generate dummy data. Assuming you have two events starting from &lt;CODE&gt;topic&lt;/CODE&gt; field) &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval data="topic=\"Sniffer\" message=\"\"timestamp\"=\"1524387631351\",\"process\"=\"com.x.android.apps\",\"packageName\"=\"com.google.android.gms\",\"type\"=\"URL\",\"URL\"=\"https://x.x.com/UploadConfigurationService/UnitUploadSettings/x071x?clientId=xx-mobile\"\"; topic=\"Sniffer\" message=\"\"timestamp\"=\"1524387779884\",\"process\"=\"com.google.android.gms\",\"packageName\"=\"com.google.android.gms\",\"type\"=\"URL\",\"URL\"=\"https://android.clients.google.com/c2dm/register3\"\""
| makemv data delim=";"
| mvexpand data
| rename data as _raw
| rex ".*message=\"(?&amp;lt;message&amp;gt;.*)\"" 
| rename message as _raw
| extract pairdelim="," kvdelim="="
| table *
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 22 Apr 2018 12:22:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Basic-Key-Value-extraction/m-p/354934#M170141</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-04-22T12:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Basic Key Value extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Basic-Key-Value-extraction/m-p/354935#M170142</link>
      <description>&lt;P&gt;@niketnilay Many thanks !!!&lt;/P&gt;</description>
      <pubDate>Sun, 22 Apr 2018 13:29:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Basic-Key-Value-extraction/m-p/354935#M170142</guid>
      <dc:creator>erichard</dc:creator>
      <dc:date>2018-04-22T13:29:21Z</dc:date>
    </item>
  </channel>
</rss>

