<?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: How should I extract the time stamp when it appears in two different formats and locations? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-should-I-extract-the-time-stamp-when-it-appears-in-two/m-p/433413#M75757</link>
    <description>&lt;P&gt;I know - it's a cute one ; -)&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2019 17:48:04 GMT</pubDate>
    <dc:creator>ddrillic</dc:creator>
    <dc:date>2019-06-18T17:48:04Z</dc:date>
    <item>
      <title>How should I extract the time stamp when it appears in two different formats and locations?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-should-I-extract-the-time-stamp-when-it-appears-in-two/m-p/433411#M75755</link>
      <description>&lt;P&gt;We have data that comes in two different formats -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jun 18 14:02:21 &amp;lt;host&amp;gt; DataCollector: [0x7f08f6ffd700] INFO  Metrics null - {"snapshot":[{"Syslog":{"totalBytesReceived":{"count":80535209337320,"timestamp":"20190618T140221.616466"},...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jun 18 14:02:19 &amp;lt;host&amp;gt; DataCollector: [0x7f4e0b2c1700] INFO  RevisionManager null....
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I did the following which works fine for the first case, but not the second, obviously ; -)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[syslog&amp;lt;case&amp;gt;]
TRANSFORMS-host_override = host_override
LINE_BREAKER=([\r\n]+)\S+\s\d+\s\d{2}:\d{2}:\d{2}
TIME_PREFIX=\"timestamp\":\"
TIME_FORMAT=%Y%m%dT%H%M%S.%6N
MAX_TIMESTAMP_LOOKAHEAD=50
TZ = UTC
TRUNCATE=10000
SHOULD_LINEMERGE=false
disabled=false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I handle the second case of the log? Here there isn't any other choice besides the time stamp at the beginning of the line.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 17:16:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-should-I-extract-the-time-stamp-when-it-appears-in-two/m-p/433411#M75755</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-06-18T17:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: How should I extract the time stamp when it appears in two different formats and locations?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-should-I-extract-the-time-stamp-when-it-appears-in-two/m-p/433412#M75756</link>
      <description>&lt;P&gt;Hi @ddrillic,&lt;/P&gt;

&lt;P&gt;Ouch...how did you get into that hole ?&lt;/P&gt;

&lt;P&gt;How about routing each into a different &lt;CODE&gt;sourcetype&lt;/CODE&gt; and applying the right time format there ?&lt;/P&gt;

&lt;P&gt;If you try to apply a match on this format : &lt;CODE&gt;Jun 18 14:02:19&lt;/CODE&gt; even if it's conditional it will match for both so no way out that.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 17:45:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-should-I-extract-the-time-stamp-when-it-appears-in-two/m-p/433412#M75756</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-06-18T17:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: How should I extract the time stamp when it appears in two different formats and locations?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-should-I-extract-the-time-stamp-when-it-appears-in-two/m-p/433413#M75757</link>
      <description>&lt;P&gt;I know - it's a cute one ; -)&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 17:48:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-should-I-extract-the-time-stamp-when-it-appears-in-two/m-p/433413#M75757</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-06-18T17:48:04Z</dc:date>
    </item>
  </channel>
</rss>

