<?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: Multiple field extractions help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Multiple-field-extractions-help/m-p/68381#M17118</link>
    <description>&lt;P&gt;thanks for the tip. there was some odd \" in the logs that i overlooked. edited my regex and the optional fields worked!&lt;/P&gt;

&lt;P&gt;but im stumped at log 2 atm. ill post it up anyway while i continue to work on it. &lt;/P&gt;

&lt;P&gt;thanks a lot! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jun 2012 01:12:24 GMT</pubDate>
    <dc:creator>attgjh1</dc:creator>
    <dc:date>2012-06-07T01:12:24Z</dc:date>
    <item>
      <title>Multiple field extractions help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-field-extractions-help/m-p/68379#M17116</link>
      <description>&lt;P&gt;EDIT1: ive tweaked my regex abit. now i can extract the 'optional' fields i want. but im stumped at this particular log. ill post it here while i continuing to work on it as well &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Summary:  &lt;/P&gt;

&lt;P&gt;{a}{b}{c}{d}{msg} are fields.&lt;BR /&gt;&lt;BR /&gt;
{a}{b}{msg} can be extracted&lt;BR /&gt;&lt;BR /&gt;
{a}{b}{c}{msg} can be extracted&lt;BR /&gt;&lt;BR /&gt;
{a}{b}{c}{d}{msg} can be extracted  &lt;/P&gt;

&lt;P&gt;having trouble with {msg} field that makes some 'message' unextractable. (i suspect this is the cause)&lt;/P&gt;

&lt;P&gt;Details:&lt;BR /&gt;&lt;BR /&gt;
here are some sample logs:(extracted the specific portion)&lt;/P&gt;

&lt;P&gt;my regex is as follows: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?i),"?\[(?P&amp;lt;Instance&amp;gt;\w+)\] (?P&amp;lt;System&amp;gt;[^\.]+)\.(?P&amp;lt;Subsystem&amp;gt;[^\.\s]+)\.*(?P&amp;lt;Application&amp;gt;[^\.\s]*)?\.*(?P&amp;lt;Object&amp;gt;[^\s]*)?\s(?P&amp;lt;Message&amp;gt;.+)"?,(CLOSED|OPEN)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;event 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;,"[cng2] CIT.COS.MW (QUEUE.MANAGER)citos.cos.m msg pending, oldest 346s (exceed threshold) 04:15",CLOSED
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Instance: cng2&lt;BR /&gt;
System: CIT&lt;BR /&gt;
Subsystem: COS&lt;BR /&gt;
Application: MW&lt;BR /&gt;
Object:&lt;BR /&gt;
Message: (QUEUE.MANAGER)citos.cos.m msg pending, oldest 346s (exceed threshold) 04:15&lt;/P&gt;

&lt;P&gt;event 2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;,"[OPS-TPTCC02] CIT.SS.COMMONS TException: [TS07] Disable sending function to TS, please contact administrators to resolve the issue.",OPEN,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Nothing extracted. However, there is actually another field after "Open" called severity that was extracted from this. So i found out about this missing event. &lt;/P&gt;

&lt;P&gt;event 3: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;,[cng1] CIT.Monitor Server is not being monitored,CLOSED,
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Instance: cng1&lt;BR /&gt;
System: CIT&lt;BR /&gt;
Subsystem: Monitor&lt;BR /&gt;
Application: &lt;BR /&gt;
Object:&lt;BR /&gt;
Message: Server is not being monitored&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2012 10:21:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-field-extractions-help/m-p/68379#M17116</guid>
      <dc:creator>attgjh1</dc:creator>
      <dc:date>2012-06-06T10:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple field extractions help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-field-extractions-help/m-p/68380#M17117</link>
      <description>&lt;P&gt;Sorry, I can't really understand your regex, and what you expect to happen. &lt;/P&gt;

&lt;P&gt;the leading comma would prohibit the Instance to match for any event. Also, I'm not sure that &lt;CODE&gt;\w&lt;/CODE&gt; will match the dash in event 2.&lt;/P&gt;

&lt;P&gt;What part of the events is System supposed to match? It's all lowercase, and no dots. The CITOS.* that comes after the [Instance] is uppercase = no match.&lt;/P&gt;

&lt;P&gt;Please make a small matrix of what you want in each field for each event.&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2012 10:47:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-field-extractions-help/m-p/68380#M17117</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-06-06T10:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple field extractions help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-field-extractions-help/m-p/68381#M17118</link>
      <description>&lt;P&gt;thanks for the tip. there was some odd \" in the logs that i overlooked. edited my regex and the optional fields worked!&lt;/P&gt;

&lt;P&gt;but im stumped at log 2 atm. ill post it up anyway while i continue to work on it. &lt;/P&gt;

&lt;P&gt;thanks a lot! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 01:12:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-field-extractions-help/m-p/68381#M17118</guid>
      <dc:creator>attgjh1</dc:creator>
      <dc:date>2012-06-07T01:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple field extractions help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-field-extractions-help/m-p/68382#M17119</link>
      <description>&lt;P&gt;Working Regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;'(?i),"?\[(?P&amp;lt;Instance&amp;gt;.+)\] (?P&amp;lt;System&amp;gt;\w+)\.(?P&amp;lt;Subsystem&amp;gt;[^\.\s]+)\.*(?P&amp;lt;Application&amp;gt;[^\.\s]*)?\.*(?P&amp;lt;Object&amp;gt;[^\s]*)?\s(?P&amp;lt;Message&amp;gt;.+),(CLOSED|OPEN)'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Apparently i was using \w wrongly.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 01:37:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-field-extractions-help/m-p/68382#M17119</guid>
      <dc:creator>attgjh1</dc:creator>
      <dc:date>2012-06-07T01:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple field extractions help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-field-extractions-help/m-p/68383#M17120</link>
      <description>&lt;P&gt;That looks a lot better. Although I could suggest the following:&lt;BR /&gt;
Instance:  match on &lt;CODE&gt;[^\]]&lt;/CODE&gt; instead of &lt;CODE&gt;.+&lt;/CODE&gt;, or at least make it lazy; &lt;CODE&gt;.+?&lt;/CODE&gt; , otherwise you might eat too much...&lt;/P&gt;

&lt;P&gt;System:  if the System can contain other characters than alphanumeric or underscore, i.e. &lt;CODE&gt;\w&lt;/CODE&gt;, consider using the same pattern as for Subsystem or Application.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 06:18:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-field-extractions-help/m-p/68383#M17120</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-06-07T06:18:49Z</dc:date>
    </item>
  </channel>
</rss>

