<?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: How to extract fields delimited by semicolons and the last field with variable values from my sample data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-delimited-by-semicolons-and-the-last-field/m-p/275777#M83186</link>
    <description>&lt;P&gt;So this is all in props.conf at search time on the search head, correct?  I will try it today.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 29 Oct 2015 06:20:24 GMT</pubDate>
    <dc:creator>smudge797</dc:creator>
    <dc:date>2015-10-29T06:20:24Z</dc:date>
    <item>
      <title>How to extract fields delimited by semicolons and the last field with variable values from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-delimited-by-semicolons-and-the-last-field/m-p/275773#M83182</link>
      <description>&lt;P&gt;Using Splunk Enterpise 6.2, I'm trying to get the fields extracted using search-time props.conf / transforms.conf and the issue is a variable value in the last field.  Can anyone tell me what the settings would be ensure these values are taken care of? The message that logs are delimited by semicolon, but unfortunately, the different messages have different amount of fields and almost constant in size 40 characters except the last field that is variable, but also not more than 300 characters.&lt;/P&gt;

&lt;P&gt;Is there a way to take care of this situation, at search-time?&lt;/P&gt;

&lt;P&gt;Log sample:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[1445004534] SERVICE ALERT: madmsc03j1;Status_Host_ID-0104;OK;HARD;2;PING OK - Packet loss = 0%, RTA = 47.89 ms
[1445004568] SERVICE ALERT: de2secimpmx001;Resource_System_Load_ID-0108;OK;HARD;1;4 CPU, average load 70.8% &amp;lt; 75% : OK
[1445004576] SERVICE ALERT: pt1secimpmx001;Resource_System_Load_ID-0108;CRITICAL;HARD;1;2 CPU, average load 91.0% &amp;gt; 90% : CRITICAL
[1445004576] SERVICE FLAPPING ALERT: pt1secimpmx001;Resource_System_Load_ID-0108;STARTED; Service appears to have started flapping (12.4% change &amp;gt;= 10.0% threshold)
[1445004586] SERVICE ALERT: it1sec02mibi-002;Resource_Memory_ID-0011;OK;SOFT;2;OK - Physical memory: 98.0% used (7.5GiB/7.7GiB)
[1445004592] SERVICE ALERT: it1sec02mibi-002;Status_Interfaces_ID-0017;OK;SOFT;2;OK - No valid historical dataset... &amp;lt;a href="https://mydomain.com/interfacetable_v3t/tables/it1sec02mibiQ2D002--Interfacetable.html" target="_self"&amp;gt;[details]&amp;lt;/a&amp;gt;
[1445004634] SERVICE FLAPPING ALERT: it1sec04mibi-001;Resource_System_Load_ID-0109;STOPPED; Service appears to have stopped flapping (0.0% change &amp;lt; 1.0% threshold)
[1445004673] SERVICE ALERT: nl2secsou3d001;Status_Process_SS_Min2_ID-0101;UNKNOWN;SOFT;1;ERROR: Alarm signal (Nagios time-out)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Currently I have props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%s
TIME_PREFIX=\[
TZ=GMT
MAX_TIMESTAMP_LOOKAHEAD=10
SHOULD_LINEMERGE=true
NO_BINARY_CHECK=true
LINE_BREAKER=([\r\n]+)
TRUNCATE=10000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 08:35:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-delimited-by-semicolons-and-the-last-field/m-p/275773#M83182</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2015-10-19T08:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields delimited by semicolons and the last field with variable values from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-delimited-by-semicolons-and-the-last-field/m-p/275774#M83183</link>
      <description>&lt;P&gt;Hi! &lt;/P&gt;

&lt;P&gt;I need to understand what is that you want to achieve. If I understood you correctly , you want to extract all the key fields that are separated by the semicolon, and  then the values at the end of the event such as "4 CPU, average load 70.8% &amp;lt; 75% : OK".&lt;BR /&gt;
I will help you to do this, although I need to understand better what you need &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 11:11:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-delimited-by-semicolons-and-the-last-field/m-p/275774#M83183</guid>
      <dc:creator>santiagoaloi</dc:creator>
      <dc:date>2015-10-19T11:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields delimited by semicolons and the last field with variable values from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-delimited-by-semicolons-and-the-last-field/m-p/275775#M83184</link>
      <description>&lt;P&gt;Yes Im trying to extract the key fields separated by ;  and the values.  But the problem is the last field is variable value but no more than 300 characters.  Hope that helps clarify &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 15:30:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-delimited-by-semicolons-and-the-last-field/m-p/275775#M83184</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2015-10-19T15:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields delimited by semicolons and the last field with variable values from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-delimited-by-semicolons-and-the-last-field/m-p/275776#M83185</link>
      <description>&lt;P&gt;So! I've done most of the field extractions. You cannot combine delimited data extractions with regex, so is either one or the other.&lt;/P&gt;

&lt;P&gt;Regex is a little tricky to tune  the way you want it to work, the regex based  field extractions in Splunk not always works as we expect, so most of the times &lt;A href="http://www.regex101.com"&gt;www.regex101.com&lt;/A&gt; becomes your best friend.&lt;/P&gt;

&lt;P&gt;You will have to change the names of the fields because since I don't know where this dataset comes from I couldn't guess much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;EXTRACT-description     = \s-|\s(?[^;]+$&lt;/STRONG&gt;) is the one you needed help with.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;props.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%s
TIME_PREFIX=\[
TZ=GMT
MAX_TIMESTAMP_LOOKAHEAD=10
SHOULD_LINEMERGE=true
NO_BINARY_CHECK=true
LINE_BREAKER=([\r\n]+)
TRUNCATE=10000

[yoursourcetype]
EXTRACT-service_type    = ^\[\d+\]\sSERVICE\s(?&amp;lt;service_type&amp;gt;\w+)
EXTRACT-service         = ^[^:\n]*:\s+(?P&amp;lt;service&amp;gt;\w+)
EXTRACT-objet_id        = _ID-(?&amp;lt;objet_id&amp;gt;\d+)
EXTRACT-status          = ^(?:[^;\n]*;){2}(?P&amp;lt;status&amp;gt;\w+)
EXTRACT-description     = \s\-|\s(?&amp;lt;description&amp;gt;[^;]+$)
EXTRACT-layer           = ^(?:[^;\n]*;){3}(?P&amp;lt;layer&amp;gt;\w+)
EXTRACT-other_status    = ^\[\d+\]\s+\w+\s+\w+:\s+\w+\d+\w+\d+\w+\d+;\w+_\w+_\w+_\w+\d+_\w+\-\d+;\w+;\w+;\d+;(?P&amp;lt;other_status&amp;gt;\w+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Oct 2015 09:02:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-delimited-by-semicolons-and-the-last-field/m-p/275776#M83185</guid>
      <dc:creator>santiagoaloi</dc:creator>
      <dc:date>2015-10-20T09:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields delimited by semicolons and the last field with variable values from my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-delimited-by-semicolons-and-the-last-field/m-p/275777#M83186</link>
      <description>&lt;P&gt;So this is all in props.conf at search time on the search head, correct?  I will try it today.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2015 06:20:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-delimited-by-semicolons-and-the-last-field/m-p/275777#M83186</guid>
      <dc:creator>smudge797</dc:creator>
      <dc:date>2015-10-29T06:20:24Z</dc:date>
    </item>
  </channel>
</rss>

