<?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: Formating question and regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Formating-question-and-regex/m-p/243457#M189023</link>
    <description>&lt;P&gt;Hey thanks for the upvote CYBR_AH, if it solved your problem please mark it as the answer too.  Cheers!&lt;/P&gt;</description>
    <pubDate>Sat, 26 Mar 2016 18:46:09 GMT</pubDate>
    <dc:creator>jkat54</dc:creator>
    <dc:date>2016-03-26T18:46:09Z</dc:date>
    <item>
      <title>Formating question and regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formating-question-and-regex/m-p/243454#M189020</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I'm trying to search for start up and shutdown message of AWS instances and build a nice table. On my test instance, the first message on the /var/log/message is the following line when I run 'earliest=-4h@h "start" | regex _raw="rsyslogd:.*" | table _raw'&lt;/P&gt;

&lt;P&gt;Mar 16 14:42:58 ip-10-0-0-2 rsyslogd: [origin software="rsyslogd" swVersion="5.8.10" x-pid="899" x-info="&lt;A href="http://www.rsyslog.com%22"&gt;http://www.rsyslog.com"&lt;/A&gt;] start &lt;/P&gt;

&lt;P&gt;I'd like to break this down and just keep. &lt;/P&gt;

&lt;P&gt;_time, IP, Command&lt;BR /&gt;
timestamp, 10.0.0.2, Start&lt;/P&gt;

&lt;P&gt;Am I going about this the wrong way?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2016 20:04:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formating-question-and-regex/m-p/243454#M189020</guid>
      <dc:creator>CYBR_AH</dc:creator>
      <dc:date>2016-03-16T20:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Formating question and regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formating-question-and-regex/m-p/243455#M189021</link>
      <description>&lt;P&gt;Try something like this (assuming you WANT to display these fields - _time, IP, Command)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-4h@h "start" | regex _raw="rsyslogd:.*" | rex "ip-(?&amp;lt;IP&amp;gt;\d+-\d+-\d+-\d+)\s[^\]]+\s+(?&amp;lt;Command&amp;gt;.*)" | table _time IP Command
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Mar 2016 20:42:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formating-question-and-regex/m-p/243455#M189021</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-16T20:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Formating question and regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formating-question-and-regex/m-p/243456#M189022</link>
      <description>&lt;PRE&gt;&lt;CODE&gt; earliest=-4h@h | rex field=_raw '(?&amp;lt;=swVersion..)(?&amp;lt;swversion&amp;gt;.*)" x-pid=.(?&amp;lt;pid&amp;gt;\d+)" x-info="(?&amp;lt;info&amp;gt;.*)"]' | table swVersion, pid, info
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Mar 2016 21:25:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formating-question-and-regex/m-p/243456#M189022</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-03-16T21:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Formating question and regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formating-question-and-regex/m-p/243457#M189023</link>
      <description>&lt;P&gt;Hey thanks for the upvote CYBR_AH, if it solved your problem please mark it as the answer too.  Cheers!&lt;/P&gt;</description>
      <pubDate>Sat, 26 Mar 2016 18:46:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formating-question-and-regex/m-p/243457#M189023</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-03-26T18:46:09Z</dc:date>
    </item>
  </channel>
</rss>

