<?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: breaking log events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/breaking-log-events/m-p/51089#M9798</link>
    <description>&lt;P&gt;Hi,thanks for the help!&lt;BR /&gt;
I hav another questn,my file also includes these lines:&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;-rw-------   1 root     sys         2984 Apr 11  2006 /var/adm/loginlog&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;vkaliya:/dev/pts/1:Wed May  4 11:14:34 2005&lt;/P&gt;

&lt;P&gt;vkaliaya:/dev/pts/1:Wed May  4 11:14:43 2005&lt;/P&gt;

&lt;P&gt;Your above prop.conf and transform.conf works with the earlier example,but it would not correctly timestamp the events (in the 2nd example). Can you assist me pls?&lt;/P&gt;</description>
    <pubDate>Mon, 14 May 2012 06:57:31 GMT</pubDate>
    <dc:creator>JeffTanYH</dc:creator>
    <dc:date>2012-05-14T06:57:31Z</dc:date>
    <item>
      <title>breaking log events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/breaking-log-events/m-p/51087#M9796</link>
      <description>&lt;P&gt;&lt;STRONG&gt;I have several text format log files in which I need help in linebreaking them into the appropriate events that I need. This is an exmaple of what my file looks like:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;LOGS_BEGIN: DO_LOG&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;-rw-------   1 root     root        3505 Apr 23 12:58 /var/adm/sulog&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;SU 02/12 16:53 - pts/1 hkim-root&lt;/P&gt;

&lt;P&gt;SU 02/12 16:53 + pts/1 hkim-root&lt;/P&gt;

&lt;P&gt;SU 02/13 13:10 + ??? root-sys&lt;/P&gt;

&lt;P&gt;SU 02/14 13:10 + ??? root-sys&lt;/P&gt;

&lt;P&gt;SU 02/15 10:28 + pts/1 hkim-root&lt;/P&gt;

&lt;P&gt;SU 02/15 13:10 + ??? root-sys&lt;/P&gt;

&lt;P&gt;SU 02/16 13:10 + ??? root-sys&lt;/P&gt;

&lt;P&gt;SU 02/17 13:10 + ??? root-sys&lt;/P&gt;

&lt;P&gt;SU 02/18 13:10 + ??? root-sys&lt;/P&gt;

&lt;P&gt;SU 02/19 13:10 + ??? root-sys&lt;/P&gt;

&lt;P&gt;SU 02/19 16:42 + pts/1 hkim-root&lt;/P&gt;

&lt;P&gt;SU 02/20 13:10 + ??? root-sys&lt;/P&gt;

&lt;P&gt;SU 02/20 15:06 + pts/1 hkim-root&lt;/P&gt;

&lt;P&gt;SU 02/21 09:54 + pts/1 hkim-root&lt;/P&gt;

&lt;P&gt;SU 02/21 13:10 + ??? root-sys&lt;/P&gt;

&lt;P&gt;SU 02/21 17:22 - pts/1 hkim-root&lt;/P&gt;

&lt;P&gt;SU 02/21 17:22 + pts/1 hkim-root&lt;/P&gt;

&lt;P&gt;SU 02/22 09:56 + pts/1 hkim-root&lt;/P&gt;

&lt;P&gt;SU 02/22 10:03 + pts/1 hkim-hkim&lt;/P&gt;

&lt;P&gt;SU 02/22 10:03 + pts/1 hkim-sybmp&lt;/P&gt;

&lt;P&gt;SU 02/22 13:10 + ??? root-sys&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;I need to be able to filter out the top part of the log,which consist of the 1st line till the 6th line (shown below)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;LOGSBEGIN: DOLOG&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;-rw------- 1 root root 3505 Apr 23 12:58 /var/adm/sulog&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;After which,I will need each and every line to be a seperate event (shown below)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;SU 02/15 10:28 + pts/1 hkim-root&lt;/P&gt;

&lt;P&gt;SU 02/15 13:10 + ??? root-sys&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;I would also have to filter out the last part of the log(shown below)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;I have tried several props.conf be it doesn't to be working!! Please help me!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:49:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/breaking-log-events/m-p/51087#M9796</guid>
      <dc:creator>JeffTanYH</dc:creator>
      <dc:date>2020-09-28T11:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: breaking log events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/breaking-log-events/m-p/51088#M9797</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[yoursourcetypename]
SHOULD_LINEMERGE=false
MAX_TIMESTAMP_LOOKAHEAD=15
TRANSFORMS-d1=delete_header_and_footer
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[delete_header_and_footer]
REGEX=(?:^=====|^LOGSBEGIN|^[-rw][-rw][-rw])
DEST_KEY=queue
FORMAT=nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What it does: tells Splunk that your data is one event per line, with the timestamp in the first 15 characters. It also takes each event and checks it against the regular expression in transforms.conf. Events that match are discarded.&lt;/P&gt;

&lt;P&gt;I checked the regular expression at &lt;A href="http://gskinner.com/RegExr/"&gt;http://gskinner.com/RegExr/&lt;/A&gt; but you should check it too.&lt;/P&gt;

&lt;P&gt;And BTW, the "d1" is just an arbitrary identifier, but it needs to be unique within props.conf.&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2012 05:42:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/breaking-log-events/m-p/51088#M9797</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-05-14T05:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: breaking log events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/breaking-log-events/m-p/51089#M9798</link>
      <description>&lt;P&gt;Hi,thanks for the help!&lt;BR /&gt;
I hav another questn,my file also includes these lines:&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;-rw-------   1 root     sys         2984 Apr 11  2006 /var/adm/loginlog&lt;/P&gt;

&lt;P&gt;====================================================&lt;/P&gt;

&lt;P&gt;vkaliya:/dev/pts/1:Wed May  4 11:14:34 2005&lt;/P&gt;

&lt;P&gt;vkaliaya:/dev/pts/1:Wed May  4 11:14:43 2005&lt;/P&gt;

&lt;P&gt;Your above prop.conf and transform.conf works with the earlier example,but it would not correctly timestamp the events (in the 2nd example). Can you assist me pls?&lt;/P&gt;</description>
      <pubDate>Mon, 14 May 2012 06:57:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/breaking-log-events/m-p/51089#M9798</guid>
      <dc:creator>JeffTanYH</dc:creator>
      <dc:date>2012-05-14T06:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: breaking log events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/breaking-log-events/m-p/51090#M9799</link>
      <description>&lt;P&gt;You could simply remove this line&lt;/P&gt;

&lt;P&gt;MAX_TIMESTAMP_LOOKAHEAD=15&lt;/P&gt;

&lt;P&gt;I don't think it is really necessary&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:49:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/breaking-log-events/m-p/51090#M9799</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2020-09-28T11:49:37Z</dc:date>
    </item>
  </channel>
</rss>

