<?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 Extracting multiple fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-fields/m-p/117610#M31344</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;My logs have strings like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Mon Mar 31 2014 10:41:48 [info] wsgw(parlayx-all-interfaces): tid(2658703090)[response][96.1.1.1]: attachment-size:{0}
Mon Mar 31 2014 10:41:48 [info] wsgw(parlayx-all-interfaces): tid(2658703090)[response][96.1.1.1]: applicationid:{}
Mon Mar 31 2014 10:41:48 [info] wsgw(parlayx-all-interfaces): tid(2658703090)[response][96.1.1.1]: operation:{getWirelessNetworkSubscriberProfileResponse} BillingType:{postpaid} EquipmentId:{} nil:{true} SimId:{} nil:{true} Imsi:{302220007118231} IpAddress:{} GatewayId:{MMS-22990121_wap2.company.com} SubscriberId:{22167135} TechnologyType:{HSPA} uri:{14185648339} PreferredLanguage:{fr-ca} ServiceProviderId:{COMPANY} UserStatus:{active}
Mon Mar 31 2014 10:41:48 [info] wsgw(parlayx-all-interfaces): tid(3159363380)[response][96.1.1.1]: attachment-size:{0}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to extract all the fields such as "operation:{getWirelessNetworkSubscriberProfileResponse}" and "TechnologyType:{HSPA}", each as a field, with the value inside the {}'s. This command works well:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=sdf | extract extract kvdelim=":" pairdelim=" "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...except that the curly brackets are left behind in the field value. Is there a way to tell extract that the value in the key/value pair has quotes (a delimiter) around it? Should I execute an additional transform? I'd love to have all these fields automatically extracted whenever I search this source, but I can't see how to do this easily. I'm sure it's possible, but I have no idea how to do that. &lt;/P&gt;

&lt;P&gt;Hope you can help, thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 02 Apr 2014 18:29:35 GMT</pubDate>
    <dc:creator>johntobin</dc:creator>
    <dc:date>2014-04-02T18:29:35Z</dc:date>
    <item>
      <title>Extracting multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-fields/m-p/117610#M31344</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;My logs have strings like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Mon Mar 31 2014 10:41:48 [info] wsgw(parlayx-all-interfaces): tid(2658703090)[response][96.1.1.1]: attachment-size:{0}
Mon Mar 31 2014 10:41:48 [info] wsgw(parlayx-all-interfaces): tid(2658703090)[response][96.1.1.1]: applicationid:{}
Mon Mar 31 2014 10:41:48 [info] wsgw(parlayx-all-interfaces): tid(2658703090)[response][96.1.1.1]: operation:{getWirelessNetworkSubscriberProfileResponse} BillingType:{postpaid} EquipmentId:{} nil:{true} SimId:{} nil:{true} Imsi:{302220007118231} IpAddress:{} GatewayId:{MMS-22990121_wap2.company.com} SubscriberId:{22167135} TechnologyType:{HSPA} uri:{14185648339} PreferredLanguage:{fr-ca} ServiceProviderId:{COMPANY} UserStatus:{active}
Mon Mar 31 2014 10:41:48 [info] wsgw(parlayx-all-interfaces): tid(3159363380)[response][96.1.1.1]: attachment-size:{0}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to extract all the fields such as "operation:{getWirelessNetworkSubscriberProfileResponse}" and "TechnologyType:{HSPA}", each as a field, with the value inside the {}'s. This command works well:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=sdf | extract extract kvdelim=":" pairdelim=" "
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...except that the curly brackets are left behind in the field value. Is there a way to tell extract that the value in the key/value pair has quotes (a delimiter) around it? Should I execute an additional transform? I'd love to have all these fields automatically extracted whenever I search this source, but I can't see how to do this easily. I'm sure it's possible, but I have no idea how to do that. &lt;/P&gt;

&lt;P&gt;Hope you can help, thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2014 18:29:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-fields/m-p/117610#M31344</guid>
      <dc:creator>johntobin</dc:creator>
      <dc:date>2014-04-02T18:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-fields/m-p/117611#M31345</link>
      <description>&lt;P&gt;This should be doable with a transforms.conf based field extraction, something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yourstanza]
REGEX = \s(?&amp;lt;_KEY_1&amp;gt;\w+):\{(?&amp;lt;_VAL_1&amp;gt;[^}]+)\}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Apr 2014 18:52:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-fields/m-p/117611#M31345</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-02T18:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-fields/m-p/117612#M31346</link>
      <description>&lt;P&gt;Thank you so much for your quick reply! This worked perfectly. I also created the following in 'props.conf' to leverage the stanza, as per the documentation (not sure if I had to do this, but it's working). I thought I'd mention this for anyone else who is trying to get this to work:&lt;/P&gt;

&lt;P&gt;[mysourcetype]&lt;BR /&gt;
REPORT-myattributes = yourstanza&lt;/P&gt;

&lt;P&gt;Relevant documentation for the version I'm using: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.0.2/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles"&gt;http://docs.splunk.com/Documentation/Splunk/6.0.2/Knowledge/Createandmaintainsearch-timefieldextractionsthroughconfigurationfiles&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2014 14:19:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-fields/m-p/117612#M31346</guid>
      <dc:creator>johntobin</dc:creator>
      <dc:date>2014-04-03T14:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-fields/m-p/117613#M31347</link>
      <description>&lt;P&gt;Yeah, the &lt;CODE&gt;REPORT-foo = bar&lt;/CODE&gt; setting in props.conf is necessary - else Splunk wouldn't know it needs to apply the transforms.conf stanza.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2014 15:10:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-multiple-fields/m-p/117613#M31347</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-04-03T15:10:19Z</dc:date>
    </item>
  </channel>
</rss>

