<?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 do I edit my regular expression for rex to extract all expected fields and values from my sample multiline event? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-for-rex-to-extract-all/m-p/274834#M82906</link>
    <description>&lt;P&gt;Here is the logged event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SepsisGraphBuilderImpl: 11252495 MS
  VitalsGraphBuilderImpl: 2257 MS
  Mic2GraphBuilder: 358360 MS
  RasGraphBuilderImpl: 201 MS
  PatientInfoGraphBuilder: 1992 MS
  InterventionEventGraphBuilderImpl: 372 MS
  ObservationInfoGraphBuilder: 42472 MS
  DrugOrderGraphBuilder: 31849 MS

  SurgeryAndRadiologyGraphBuilder: 232 MS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am wanting to grab each graphbuilder and the time in MS.  I thought this search would work, but I am only getting Mic2GraphBuilder:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=s*gs* *GraphBuilder* | rex field=_raw "(?&amp;lt;object&amp;gt;\w+GraphBuilder*): (?&amp;lt;totalms&amp;gt;\d+) MS" | table object, totalms
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 08 Dec 2015 17:28:56 GMT</pubDate>
    <dc:creator>pkudrle</dc:creator>
    <dc:date>2015-12-08T17:28:56Z</dc:date>
    <item>
      <title>How do I edit my regular expression for rex to extract all expected fields and values from my sample multiline event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-for-rex-to-extract-all/m-p/274834#M82906</link>
      <description>&lt;P&gt;Here is the logged event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SepsisGraphBuilderImpl: 11252495 MS
  VitalsGraphBuilderImpl: 2257 MS
  Mic2GraphBuilder: 358360 MS
  RasGraphBuilderImpl: 201 MS
  PatientInfoGraphBuilder: 1992 MS
  InterventionEventGraphBuilderImpl: 372 MS
  ObservationInfoGraphBuilder: 42472 MS
  DrugOrderGraphBuilder: 31849 MS

  SurgeryAndRadiologyGraphBuilder: 232 MS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am wanting to grab each graphbuilder and the time in MS.  I thought this search would work, but I am only getting Mic2GraphBuilder:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=s*gs* *GraphBuilder* | rex field=_raw "(?&amp;lt;object&amp;gt;\w+GraphBuilder*): (?&amp;lt;totalms&amp;gt;\d+) MS" | table object, totalms
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Dec 2015 17:28:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-for-rex-to-extract-all/m-p/274834#M82906</guid>
      <dc:creator>pkudrle</dc:creator>
      <dc:date>2015-12-08T17:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression for rex to extract all expected fields and values from my sample multiline event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-for-rex-to-extract-all/m-p/274835#M82907</link>
      <description>&lt;P&gt;Your regex is looking for words that end with "GraphBuilde" and any number of r's on the end.  Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=s*gs* *GraphBuilder* | rex field=_raw "(?&amp;lt;object&amp;gt;\w+GraphBuilder\w*): (?&amp;lt;totalms&amp;gt;\d+) MS" | table object, totalms
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you have one graphbuilder/time pair per event then this will work.  If you have multiple pairs per event then you will have to add &lt;CODE&gt;max_match=0&lt;/CODE&gt; to the rex command and then process the object and totalms fields as multi-valued fields.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2015 17:54:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-for-rex-to-extract-all/m-p/274835#M82907</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-12-08T17:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression for rex to extract all expected fields and values from my sample multiline event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-for-rex-to-extract-all/m-p/274836#M82908</link>
      <description>&lt;P&gt;Without a Splunk in front of me, I wonder if it's actually be easier to use &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/extract"&gt;extract&lt;/A&gt; with perhaps &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/untable"&gt;untable&lt;/A&gt; something like...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=s*gs* *GraphBuilder* | extract kvdelim=":" | untable _time object totalms
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There may be some eval to clean up but it seems like it'd be easier than fighting regular expressions to make multi valued fields.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 01:20:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-for-rex-to-extract-all/m-p/274836#M82908</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2015-12-09T01:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression for rex to extract all expected fields and values from my sample multiline event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-for-rex-to-extract-all/m-p/274837#M82909</link>
      <description>&lt;P&gt;how do you then parse the multi-valued fields as pairs?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 14:32:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-for-rex-to-extract-all/m-p/274837#M82909</guid>
      <dc:creator>pkudrle</dc:creator>
      <dc:date>2015-12-09T14:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression for rex to extract all expected fields and values from my sample multiline event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-for-rex-to-extract-all/m-p/274838#M82910</link>
      <description>&lt;P&gt;You combine the two multi-valued fields and then expand them into separate events.  Then you process each event as you normally would.  Something like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=s*gs* *GraphBuilder* | rex field=_raw "(?&amp;lt;object&amp;gt;\w+GraphBuilder\w*): (?&amp;lt;totalms&amp;gt;\d+) MS"  | eval pairs=mvzip(object,totalms) | mvexpand pairs | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Dec 2015 14:45:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-for-rex-to-extract-all/m-p/274838#M82910</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-12-09T14:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my regular expression for rex to extract all expected fields and values from my sample multiline event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-for-rex-to-extract-all/m-p/274839#M82911</link>
      <description>&lt;P&gt;Unfortunately there is some text before and afterwards that interfere&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2015 17:00:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-regular-expression-for-rex-to-extract-all/m-p/274839#M82911</guid>
      <dc:creator>pkudrle</dc:creator>
      <dc:date>2015-12-09T17:00:23Z</dc:date>
    </item>
  </channel>
</rss>

