<?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: Issues with XML Linebreaker in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Issues-with-XML-Linebreaker/m-p/532987#M89558</link>
    <description>&lt;P&gt;alright so apparently the GUI is sometimes buggy when you try to change a sourcetype. so to do more than just the linebreak - especially the deletion of the header - I did this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;since it's a huge one line event and has no breakt the FIELD_HEADER_REGEX doesn't work here. what I did was:&amp;nbsp;&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TRANSFORMS-t1 = extraction&lt;/LI-CODE&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[extraction]
REGEX = \&amp;lt;\?xml\sversion="\d.\d"\sencoding="UTF-8"\s\?\&amp;gt;\&amp;lt;dataroot\&amp;gt;
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;this captured the whole xml lalala crap until the actual event begins. since there is &amp;lt;dataroot&amp;gt; at the beginning AND end, this deletes both.&lt;/P&gt;&lt;P&gt;to extract the necessary ActionDate and ActionTime and put it together into a new timestamp I did the following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;REPORT-actiondate = actiondate
EVAL-_time = strptime(ActionDate +" " + ActionTime,"%Y-%m-%d %H:%M:%S")&lt;/LI-CODE&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[actiondate]
REGEX = \&amp;lt;ActionDate\&amp;gt;(?P&amp;lt;ActionDate&amp;gt;\d+-\d+-\d+)\&amp;lt;\/ActionDate\&amp;gt;\s*\&amp;lt;ActionTime\&amp;gt;(?P&amp;lt;ActionTime&amp;gt;\d+:\d+:\d+)
FORMAT = $1::$2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still don't understand the part "broken out using spath mean" so I figured I'd do it with .. well, spath via SPL:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;index=myindex sourcetype=mysourcetype&amp;nbsp;|spath input=_raw path=&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that did it for me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Dec 2020 13:42:09 GMT</pubDate>
    <dc:creator>avoelk</dc:creator>
    <dc:date>2020-12-14T13:42:09Z</dc:date>
    <item>
      <title>Issues with XML Linebreaker</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issues-with-XML-Linebreaker/m-p/532970#M89556</link>
      <description>&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;Hello fellow splunkers,&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;right now I'm working through the 7 labs for SE II which are necessary to be able to start the finishing accreditation quiz. I've been able to finish 5 of them by now but am totally lost with lab 6. here the &lt;STRONG&gt;instructions are:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;- events should begin with &amp;lt;Interceptor&amp;gt; and end with &amp;lt;/Interceptor&amp;gt; (so Linebreaking is needed)&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;- Extract (at search time) all fields and values in between the Interceptor lines and throw away any of the header lines before the first &amp;lt;Interceptor&amp;gt; and the line after the very last &amp;lt;/Interceptor&amp;gt;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;- Use the ActionDate and ActionTime field as the timestamp&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;- have Splunk auto extract the fields and values&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&lt;STRONG&gt;how they say I'd know I've done it:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;- I'll have x amount of events and the fields broken out using SPATH notation&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;- the correct timestamp&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;- no text before the first and after the last Interceptor&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&lt;STRONG&gt;What I have so far:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;- I'm able to extract ActionDate and ActionTime to create a new timestamp&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;- I'm able to linebreak with LINE_BREAK = \&amp;lt;Interceptor\&amp;gt;()&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&lt;STRONG&gt;My Issue:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;- When I linebreak I save the new sourcetype and try to proceed to alter it given the other things to do like extract timestamp or delete the header text. but when I change ANYTHING it just disregards the linebreaker argument and goes back to be one huge event again and I can't do anything about it.&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;- even if I could linebreak and extract everything as stated, I don't really understand what they mean with "broken out using SPATH mean". do they mean via SPL ? cause they clearly stated that Splunk should "auto extract the fields and values"&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&lt;STRONG&gt;How the data looks:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" ?&amp;gt;&amp;lt;dataroot&amp;gt;&amp;lt;Interceptor&amp;gt;&amp;lt;AttackCoords&amp;gt;-80.33100097073213,25.10742916222947&amp;lt;/AttackCoords&amp;gt;&amp;lt;Outcome&amp;gt;Interdiction&amp;lt;/Outcome&amp;gt;&amp;lt;Infiltrators&amp;gt;23&amp;lt;/Infiltrators&amp;gt;&amp;lt;Enforcer&amp;gt;Ironwood&amp;lt;/Enforcer&amp;gt;&amp;lt;ActionDate&amp;gt;2013-04-24&amp;lt;/ActionDate&amp;gt;&amp;lt;ActionTime&amp;gt;00:07:00&amp;lt;/ActionTime&amp;gt;&amp;lt;RecordNotes&amp;gt;&amp;lt;/RecordNotes&amp;gt;&amp;lt;NumEscaped&amp;gt;0&amp;lt;/NumEscaped&amp;gt;&amp;lt;LaunchCoords&amp;gt;-80.23429525620114,24.08680387475695&amp;lt;/LaunchCoords&amp;gt;&amp;lt;AttackVessel&amp;gt;Rustic&amp;lt;/AttackVessel&amp;gt;&amp;lt;/Interceptor&amp;gt;&amp;lt;Interceptor&amp;gt;&amp;lt;AttackCoords&amp;gt;-80.14622349209523,24.53605142362535&amp;lt;/AttackCoords&amp;gt;&amp;lt;Outcome&amp;gt;Interdiction&amp;lt;/Outcome&amp;gt;&amp;lt;Infiltrators&amp;gt;6&amp;lt;/Infiltrators&amp;gt;&amp;lt;Enforcer&amp;gt;Cunningham&amp;lt;/Enforcer&amp;gt;&amp;lt;ActionDate&amp;gt;2013-04-26&amp;lt;/ActionDate&amp;gt;&amp;lt;ActionTime&amp;gt;00:23:00&amp;lt;/ActionTime&amp;gt;&amp;lt;RecordNotes&amp;gt;&amp;lt;/RecordNotes&amp;gt;&amp;lt;NumEscaped&amp;gt;0&amp;lt;/NumEscaped&amp;gt;&amp;lt;LaunchCoords&amp;gt;&amp;lt;/LaunchCoords&amp;gt;&amp;lt;AttackVessel&amp;gt;Raft&amp;lt;/AttackVessel&amp;gt;&amp;lt;/Interceptor&amp;gt;&amp;lt;Interceptor&amp;gt;&amp;lt;AttackCoords&amp;gt;-80.75496221688965,24.72483828554483&amp;lt;/AttackCoords&amp;gt;&amp;lt;Outcome&amp;gt;Interdiction&amp;lt;/Outcome&amp;gt;&amp;lt;Infiltrators&amp;gt;11&amp;lt;/Infiltrators&amp;gt;&amp;lt;Enforcer&amp;gt;Forthright&amp;lt;/Enforcer&amp;gt;&amp;lt;ActionDate&amp;gt;2013-05-15&amp;lt;/ActionDate&amp;gt;&amp;lt;ActionTime&amp;gt;23:35:00&amp;lt;/ActionTime&amp;gt;&amp;lt;RecordNotes&amp;gt;&amp;lt;/RecordNotes&amp;gt;&amp;lt;NumEscaped&amp;gt;0&amp;lt;/NumEscaped&amp;gt;&amp;lt;LaunchCoords&amp;gt;-79.65932674368925,23.70743135623052&amp;lt;/LaunchCoords&amp;gt;&amp;lt;AttackVessel&amp;gt;Rustic&amp;lt;/AttackVessel&amp;gt;&amp;lt;/Interceptor&amp;gt;&amp;lt;Interceptor&amp;gt;&amp;lt;AttackCoords&amp;gt;-80.32020594311533,25.02156920297054&amp;lt;/AttackCoords&amp;gt;&amp;lt;Outcome&amp;gt;Interdiction&amp;lt;/Outcome&amp;gt;&amp;lt;Infiltrators&amp;gt;6&amp;lt;/Infiltrators&amp;gt;&amp;lt;Enforcer&amp;gt;Pompano&amp;lt;/Enforcer&amp;gt;&amp;lt;ActionDate&amp;gt;2013-02-25&amp;lt;/ActionDate&amp;gt;&amp;lt;ActionTime&amp;gt;15:35:00&amp;lt;/ActionTime&amp;gt;&amp;lt;RecordNotes&amp;gt;&amp;lt;/RecordNotes&amp;gt;&amp;lt;NumEscaped&amp;gt;0&amp;lt;/NumEscaped&amp;gt;&amp;lt;LaunchCoords&amp;gt;&amp;lt;/LaunchCoords&amp;gt;&amp;lt;AttackVessel&amp;gt;Raft&amp;lt;/AttackVessel&amp;gt;&amp;lt;/Interceptor&amp;gt;&amp;lt;Interceptor&amp;gt;&amp;lt;AttackCoords&amp;gt;-80.15149489716094,24.57412215015249&amp;lt;/AttackCoords&amp;gt;&amp;lt;Outcome&amp;gt;Interdiction&amp;lt;/Outcome&amp;gt;&amp;lt;Infiltrators&amp;gt;6&amp;lt;/Infiltrators&amp;gt;&amp;lt;Enforcer&amp;gt;Tripoteur&amp;lt;/Enforcer&amp;gt;&amp;lt;ActionDate&amp;gt;2013-04-13&amp;lt;/ActionDate&amp;gt;&amp;lt;ActionTime&amp;gt;15:40:00&amp;lt;/ActionTime&amp;gt;&amp;lt;RecordNotes&amp;gt;&amp;lt;/RecordNotes&amp;gt;&amp;lt;NumEscaped&amp;gt;0&amp;lt;/NumEscaped&amp;gt;&amp;lt;LaunchCoords&amp;gt;-79.65999190070923,23.73619147168514&amp;lt;/LaunchCoords&amp;gt;&amp;lt;AttackVessel&amp;gt;Raft&amp;lt;/AttackVessel&amp;gt;&amp;lt;/Interceptor&amp;gt;&amp;lt;/dataroot&amp;gt;&lt;/PRE&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;I hope someone can help understand how to proceed here.&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;&lt;STRONG&gt;EDIT:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;in Lab 4 there was almost the same data to input - the only difference is that in lab6 it has no linebreaks whatsoever. here is my props.conf from lab4:&lt;/P&gt;&lt;PRE&gt;[dreamcrusher]
DATETIME_CONFIG = 
FIELD_HEADER_REGEX = &amp;lt;Interceptor&amp;gt;
LINE_BREAKER = \&amp;lt;Interceptor\&amp;gt;
MAX_DAYS_AGO = 4000
NO_BINARY_CHECK = true
category = Custom
disabled = false
pulldown_type = true
REPORT-actiondate = actiondate
EVAL-_time = strptime(ActionDate +" " + ActionTime,"%Y-%m-%d %H:%M:%S")&lt;/PRE&gt;&lt;P class="_1qeIAgB0cPwnLhDF9XSiJM"&gt;and my transforms.conf:&lt;/P&gt;&lt;PRE&gt;#[actiondate]
#REGEX = \&amp;lt;ActionDate\&amp;gt;(?P&amp;lt;ActionDate&amp;gt;\d+-\d+-\d+)\&amp;lt;\/ActionDate\&amp;gt;\s*\&amp;lt;ActionTime\&amp;gt;(?P&amp;lt;ActionTime&amp;gt;\d+:\d+:\d+)
#FORMAT = $1::$2&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 12:05:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issues-with-XML-Linebreaker/m-p/532970#M89556</guid>
      <dc:creator>avoelk</dc:creator>
      <dc:date>2020-12-14T12:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with XML Linebreaker</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Issues-with-XML-Linebreaker/m-p/532987#M89558</link>
      <description>&lt;P&gt;alright so apparently the GUI is sometimes buggy when you try to change a sourcetype. so to do more than just the linebreak - especially the deletion of the header - I did this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;since it's a huge one line event and has no breakt the FIELD_HEADER_REGEX doesn't work here. what I did was:&amp;nbsp;&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TRANSFORMS-t1 = extraction&lt;/LI-CODE&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[extraction]
REGEX = \&amp;lt;\?xml\sversion="\d.\d"\sencoding="UTF-8"\s\?\&amp;gt;\&amp;lt;dataroot\&amp;gt;
DEST_KEY = queue
FORMAT = nullQueue&lt;/LI-CODE&gt;&lt;P&gt;this captured the whole xml lalala crap until the actual event begins. since there is &amp;lt;dataroot&amp;gt; at the beginning AND end, this deletes both.&lt;/P&gt;&lt;P&gt;to extract the necessary ActionDate and ActionTime and put it together into a new timestamp I did the following:&amp;nbsp;&lt;/P&gt;&lt;P&gt;props.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;REPORT-actiondate = actiondate
EVAL-_time = strptime(ActionDate +" " + ActionTime,"%Y-%m-%d %H:%M:%S")&lt;/LI-CODE&gt;&lt;P&gt;transforms.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[actiondate]
REGEX = \&amp;lt;ActionDate\&amp;gt;(?P&amp;lt;ActionDate&amp;gt;\d+-\d+-\d+)\&amp;lt;\/ActionDate\&amp;gt;\s*\&amp;lt;ActionTime\&amp;gt;(?P&amp;lt;ActionTime&amp;gt;\d+:\d+:\d+)
FORMAT = $1::$2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still don't understand the part "broken out using spath mean" so I figured I'd do it with .. well, spath via SPL:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;index=myindex sourcetype=mysourcetype&amp;nbsp;|spath input=_raw path=&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that did it for me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 13:42:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Issues-with-XML-Linebreaker/m-p/532987#M89558</guid>
      <dc:creator>avoelk</dc:creator>
      <dc:date>2020-12-14T13:42:09Z</dc:date>
    </item>
  </channel>
</rss>

