<?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: mainframe log parsing help - crazy log format in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198011#M57245</link>
    <description>&lt;P&gt;Nice - I will start testing - Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 24 Mar 2014 12:12:14 GMT</pubDate>
    <dc:creator>ebailey</dc:creator>
    <dc:date>2014-03-24T12:12:14Z</dc:date>
    <item>
      <title>mainframe log parsing help - crazy log format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198009#M57243</link>
      <description>&lt;P&gt;Greetings&lt;/P&gt;

&lt;P&gt;I have been staring at the below for sometime and I have no idea where to start to get this log to parse correctly in Splunk. I would like to get the message broken down by message size and then parsed into 25 characters strings and then do a field extraction to break out all the fields I defined in the decoder ring. I am pretty sure I am approaching this wrong so any pointers are appreciated.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;

&lt;P&gt;Here is the message and below is the decoder ring&lt;/P&gt;

&lt;P&gt;"I cannot get the message to paste into the window correctly. The message is a single string with the message size "00987" and then 4 spaces before the rest of the message"&lt;/P&gt;

&lt;P&gt;00987     201406919331234000930000020140691933123400067000002014069193311110007000000201406919331234000990000020140691933000000103000002014069193303370006300000201406919333150000090000020140691933600000002000002014069193362000000400000201406919336600000750000020140691933665000003000002014069193366700008100000201406919336672000670000020140691933668000009000002014069193366820000900000201406919336710000030000020140691933677000272000002014069193367900026100000201406919336792000090000020140691933700004425000102014069193370040004200000201406919337040002540000020140691933711100025000002014069193371120001300000201406919337200000060000020140691933730000006000002014069193373500016200000201406919337400002710000020140691933770000002000002014069193377600022600000201406919337770000050000020140691933791000004000002014069193379510001000000201406919338000001290000120140691933889000002000002014069193399000016400000201406919339910000140000020140691934651000001000002014069193361000003500000&lt;/P&gt;

&lt;P&gt;Decoder Ring&lt;/P&gt;

&lt;P&gt;00987 - message size &lt;/P&gt;

&lt;P&gt;First 25 character block&lt;/P&gt;

&lt;P&gt;2014069193312340009300000&lt;/P&gt;

&lt;P&gt;Year (4)                              - 2014&lt;BR /&gt;
Julian (3)                            - 069&lt;BR /&gt;
24-hour time (4)                      - 1933&lt;BR /&gt;
Product Code (4)                      - 1234&lt;BR /&gt;
Success (5)                           - 00093&lt;BR /&gt;
Errors (5)                            - 00000&lt;/P&gt;</description>
      <pubDate>Sun, 23 Mar 2014 16:12:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198009#M57243</guid>
      <dc:creator>ebailey</dc:creator>
      <dc:date>2014-03-23T16:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: mainframe log parsing help - crazy log format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198010#M57244</link>
      <description>&lt;P&gt;Hi, the following has been tested and works fine. The tricky part is to split the line into several events, which is done through the somewhat hard-to-read regex in &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///path/to/your/mainframe.log]
sourcetype = my_mainframe
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_mainframe]
TIME_FORMAT = %Y%j%H%M
SHOULD_LINEMERGE = false
LINE_BREAKER = (?:\d+\s+)?(\B)(?=20[1-3]\d[0-3]\d\d[0-2]\d[0-5])
SEDCMD-dropfirstline = s/\d+\s+//
EXTRACT-blah = ^(?&amp;lt;my_date&amp;gt;\d{7})(?&amp;lt;my_time&amp;gt;\d{4})(?&amp;lt;product_code&amp;gt;\d{4})(?&amp;lt;success&amp;gt;\d{5})(?&amp;lt;errors&amp;gt;\d{5})
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;K&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2014 08:18:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198010#M57244</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-03-24T08:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: mainframe log parsing help - crazy log format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198011#M57245</link>
      <description>&lt;P&gt;Nice - I will start testing - Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2014 12:12:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198011#M57245</guid>
      <dc:creator>ebailey</dc:creator>
      <dc:date>2014-03-24T12:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: mainframe log parsing help - crazy log format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198012#M57246</link>
      <description>&lt;P&gt;Just be aware that the raw event looks like a large number in scientific notation, e.g. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2.014069e+24
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is just the way splunk presents large numbers. The field extractions will work just the same, and you can make  your &lt;CODE&gt;stats/top/table&lt;/CODE&gt; etc reporting on the extracted fields anyway.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2014 12:50:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198012#M57246</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-03-24T12:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: mainframe log parsing help - crazy log format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198013#M57247</link>
      <description>&lt;P&gt;Works great - I cannot figure out how to my_date to parse correctly but not a critical issue. - Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2014 04:48:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198013#M57247</guid>
      <dc:creator>ebailey</dc:creator>
      <dc:date>2014-03-28T04:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: mainframe log parsing help - crazy log format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198014#M57248</link>
      <description>&lt;P&gt;Well, in the config example the &lt;CODE&gt;my_date&lt;/CODE&gt; field is extracted as a string, but it is also (together the time portion), through the &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; extracted into the &lt;CODE&gt;_time&lt;/CODE&gt; field, which can be used for further processing. &lt;/P&gt;

&lt;P&gt;To extract and format the subparts, like the month, or day of the week, you can use the &lt;CODE&gt;strftime()&lt;/CODE&gt; functions for &lt;CODE&gt;eval&lt;/CODE&gt;, e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval my_special_date = strftime(_time,"%B:%d:%A-%H:%M")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which would give results like "March:28:Monday-16:34".&lt;/P&gt;

&lt;P&gt;see &lt;A href="http://www.strftime.net"&gt;www.strftime.net&lt;/A&gt; for a list of commonly used variables and their meaning.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2014 07:05:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198014#M57248</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-03-28T07:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: mainframe log parsing help - crazy log format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198015#M57249</link>
      <description>&lt;P&gt;Hi can you let us know how are you getting the mainframes data into splunk please&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 19:26:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198015#M57249</guid>
      <dc:creator>Tejkumar451</dc:creator>
      <dc:date>2017-02-13T19:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: mainframe log parsing help - crazy log format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198016#M57250</link>
      <description>&lt;P&gt;Mostly MF jobs that drop files into a ftp directory and then splunk logs in and downloads the logs from the ftp site. Also a Perl script that pulls data from a custom MF program buffer. That is the voodoo that produces the output this post is about. If you can afford it the solution from IronPort is awesome. It  really works well and avoids the hell of trying to pull information from a MF by other means.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 12:59:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/mainframe-log-parsing-help-crazy-log-format/m-p/198016#M57250</guid>
      <dc:creator>ebaileytu</dc:creator>
      <dc:date>2017-03-01T12:59:20Z</dc:date>
    </item>
  </channel>
</rss>

