<?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 Simple event parsing question in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Simple-event-parsing-question/m-p/48626#M179525</link>
    <description>&lt;P&gt;My log file has tabular (several columns) data that I need to parse.  Each element in a row is separated by spaces, and the columns line up:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Event 1:   01-11 22:22    Some_Data    2   ABC
Event 2:   01-11 20:22    Other_Data   0   XYZABC
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I "tag" each column so that I can search and filter by it.  For instance, if I'd like to call the second column TITLE, I then would like to be able to filter for all events where the TITLE="Some_Data"..which should then return Event 1.&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jan 2012 16:33:44 GMT</pubDate>
    <dc:creator>ehs</dc:creator>
    <dc:date>2012-01-11T16:33:44Z</dc:date>
    <item>
      <title>Simple event parsing question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-event-parsing-question/m-p/48626#M179525</link>
      <description>&lt;P&gt;My log file has tabular (several columns) data that I need to parse.  Each element in a row is separated by spaces, and the columns line up:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Event 1:   01-11 22:22    Some_Data    2   ABC
Event 2:   01-11 20:22    Other_Data   0   XYZABC
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I "tag" each column so that I can search and filter by it.  For instance, if I'd like to call the second column TITLE, I then would like to be able to filter for all events where the TITLE="Some_Data"..which should then return Event 1.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2012 16:33:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-event-parsing-question/m-p/48626#M179525</guid>
      <dc:creator>ehs</dc:creator>
      <dc:date>2012-01-11T16:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Simple event parsing question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Simple-event-parsing-question/m-p/48627#M179526</link>
      <description>&lt;P&gt;Assuming that the data is indexed without the "Event 1:" etc.. prefix :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;01-11 22:22    Some_Data    2   ABC
01-11 20:22    Other_Data   0   XYZABC
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then in props.conf you could define a search time extraction like :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_sourcetype]
EXTRACT-extract_my_fields = (?&amp;lt;datetime&amp;gt;\d{2}-\d{2}\s\d{2}:\d{2})\s+(?&amp;lt;title&amp;gt;\w+)\s+(?&amp;lt;col3&amp;gt;\w+)\s+(?&amp;lt;col4&amp;gt;\w+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note : I've made a few assumptions about the pattern of the column values, hence it's a rather generic regex, but you can tweak it as needed. Also, I didn't know what to name col3 and col4, so put your own keys in.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2012 21:37:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Simple-event-parsing-question/m-p/48627#M179526</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2012-01-11T21:37:45Z</dc:date>
    </item>
  </channel>
</rss>

