<?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 Custom parsing in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Custom-parsing/m-p/72321#M18079</link>
    <description>&lt;P&gt;I am rookie here. &lt;BR /&gt;
I have a log of type&lt;BR /&gt;
"2e 00000008  M 2050 nodemgr  09/10/21 20:01:11.860361 NODEMGR: Successfully set our time"&lt;BR /&gt;
I would like to extract the fields as below. &lt;BR /&gt;
deviceId moduleId level id moduleName time(YY,mm,DD HH:MM:SS) message&lt;BR /&gt;
I do not want to parse the message at this point, but may want to parse a subset of structured messages at a later point. &lt;BR /&gt;
How do I go about doing this?&lt;/P&gt;</description>
    <pubDate>Wed, 26 Sep 2012 23:42:22 GMT</pubDate>
    <dc:creator>yhemaraj</dc:creator>
    <dc:date>2012-09-26T23:42:22Z</dc:date>
    <item>
      <title>Custom parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-parsing/m-p/72321#M18079</link>
      <description>&lt;P&gt;I am rookie here. &lt;BR /&gt;
I have a log of type&lt;BR /&gt;
"2e 00000008  M 2050 nodemgr  09/10/21 20:01:11.860361 NODEMGR: Successfully set our time"&lt;BR /&gt;
I would like to extract the fields as below. &lt;BR /&gt;
deviceId moduleId level id moduleName time(YY,mm,DD HH:MM:SS) message&lt;BR /&gt;
I do not want to parse the message at this point, but may want to parse a subset of structured messages at a later point. &lt;BR /&gt;
How do I go about doing this?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 23:42:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-parsing/m-p/72321#M18079</guid>
      <dc:creator>yhemaraj</dc:creator>
      <dc:date>2012-09-26T23:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Custom parsing</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Custom-parsing/m-p/72322#M18080</link>
      <description>&lt;P&gt;So two things you'll want to do:&lt;/P&gt;

&lt;P&gt;First, create a stanza in transforms.conf that uses regex to parse out your fields.  (Below is an example, which is based on the one line you posted.  It may need to be tweaked)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype_extraction]
REGEX = (\w+)\s+(\d+)\s+(\w+)\s+(\d+)\s+(\w+)\s+(\d+/\d+/\d+\s\d+:\d+:\d+\.\d+)\s(.*)
FORMAT = deviceId::$1 moduleId::$2 level::$3 id::$4 moduleName::$5 time::$6 message::$7
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then you'll want to create a stanza in your props.conf that applies the transform to your sourcetype.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
REPORT-sourcetype = sourcetype_extraction
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;All of this is applied at search time, so will apply to anything you've already indexed, and can be changed without losing anything.  &lt;/P&gt;

&lt;P&gt;It's also worth noting that the timestamp should be getting extracted on index into the _time field, so you shouldn't have to explicitly pull it out.  But it may be a good idea to do so anyway via the TIMEFORMAT setting in props.conf.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2012 00:28:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Custom-parsing/m-p/72322#M18080</guid>
      <dc:creator>emiller42</dc:creator>
      <dc:date>2012-09-27T00:28:21Z</dc:date>
    </item>
  </channel>
</rss>

