<?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 Formatting line breaks and timestamps with props.conf in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Formatting-line-breaks-and-timestamps-with-props-conf/m-p/119580#M24882</link>
    <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I'm trying to deal with a specific requirement and I've tried modifying the props.conf to my liking, but I can't get it to do what I'd like it to do.&lt;/P&gt;

&lt;P&gt;I have a multi-line event that I'd like parsed as a single event as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Mon Jan 20 16:55:01 GMT 2014
Jan 20 16:54 SCHEDULER.log
Jan 20 16:54 DOWNLOADFROMNZ.log
Jan 20 16:52 UPLOADTONZ.log
Jan 20 16:54 NZJOBLOGGER.log
Jan 20 16:29 ETLPROCESS.log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From the above, the rules would be as follows:&lt;/P&gt;

&lt;P&gt;Timestamp would be the first line, always in that format&lt;BR /&gt;
I would then have the multi-line event below parsed as a single event so that I could table it and show that table&lt;BR /&gt;
The table columns would be through field extraction as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Last_Active Filename
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My problems are:&lt;/P&gt;

&lt;P&gt;I can't get it to parse all of the above as a single event&lt;/P&gt;

&lt;P&gt;I can't seem to exclude the timestamp in the first line. The line itself doesn't need to be indexed, only referenced to grab the event timestamp&lt;/P&gt;

&lt;P&gt;Does anyone have any ideas how best I can achieve this?&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jan 2014 17:09:57 GMT</pubDate>
    <dc:creator>Lazarix</dc:creator>
    <dc:date>2014-01-20T17:09:57Z</dc:date>
    <item>
      <title>Formatting line breaks and timestamps with props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Formatting-line-breaks-and-timestamps-with-props-conf/m-p/119580#M24882</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I'm trying to deal with a specific requirement and I've tried modifying the props.conf to my liking, but I can't get it to do what I'd like it to do.&lt;/P&gt;

&lt;P&gt;I have a multi-line event that I'd like parsed as a single event as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Mon Jan 20 16:55:01 GMT 2014
Jan 20 16:54 SCHEDULER.log
Jan 20 16:54 DOWNLOADFROMNZ.log
Jan 20 16:52 UPLOADTONZ.log
Jan 20 16:54 NZJOBLOGGER.log
Jan 20 16:29 ETLPROCESS.log
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From the above, the rules would be as follows:&lt;/P&gt;

&lt;P&gt;Timestamp would be the first line, always in that format&lt;BR /&gt;
I would then have the multi-line event below parsed as a single event so that I could table it and show that table&lt;BR /&gt;
The table columns would be through field extraction as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Last_Active Filename
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My problems are:&lt;/P&gt;

&lt;P&gt;I can't get it to parse all of the above as a single event&lt;/P&gt;

&lt;P&gt;I can't seem to exclude the timestamp in the first line. The line itself doesn't need to be indexed, only referenced to grab the event timestamp&lt;/P&gt;

&lt;P&gt;Does anyone have any ideas how best I can achieve this?&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2014 17:09:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Formatting-line-breaks-and-timestamps-with-props-conf/m-p/119580#M24882</guid>
      <dc:creator>Lazarix</dc:creator>
      <dc:date>2014-01-20T17:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting line breaks and timestamps with props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Formatting-line-breaks-and-timestamps-with-props-conf/m-p/119581#M24883</link>
      <description>&lt;P&gt;Something like this ought to work. The "Last_Active" values will be ordinary strings, so don't expect any date-like behaviour, unless you convert it further, e.g. with &lt;CODE&gt;convert&lt;/CODE&gt;, or &lt;CODE&gt;strftime/strptime&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;props.conf &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n+])\w{3}\s\w{3}
TIME_FORMAT = %a %b %d %H:%M:%S %Z %Y
REPORT-my_extractions
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_extractions]
REGEX = (?m)(?&amp;lt;Last_Active&amp;gt;\w+\s\d+\s\d+:\d+)\s+(?&amp;lt;Filename&amp;gt;\S+)[\r\n]*
MV_ADD = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2014 20:14:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Formatting-line-breaks-and-timestamps-with-props-conf/m-p/119581#M24883</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-01-20T20:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting line breaks and timestamps with props.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Formatting-line-breaks-and-timestamps-with-props-conf/m-p/119582#M24884</link>
      <description>&lt;P&gt;Yep, This did exactly what I wanted it to do, apart from it including the first line (the date/time stamp) in the event. It did however make everything one event.&lt;/P&gt;

&lt;P&gt;The problem I found after doing this, is that I couldn't table it because the field extractions stopped working. I guess I'll have to go back to a single line for each entry.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2014 10:05:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Formatting-line-breaks-and-timestamps-with-props-conf/m-p/119582#M24884</guid>
      <dc:creator>Lazarix</dc:creator>
      <dc:date>2014-01-21T10:05:59Z</dc:date>
    </item>
  </channel>
</rss>

