<?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 to set a different time format? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333998#M61763</link>
    <description>&lt;P&gt;&lt;CODE&gt;[&lt;/CODE&gt; plays a special role in regular expressions, as the start of a character set notation (e.g. &lt;CODE&gt;[a-z]&lt;/CODE&gt;). So if you want to match the literal &lt;CODE&gt;[&lt;/CODE&gt; character, you need to escape it:&lt;BR /&gt;
&lt;CODE&gt;TIME_PREFIX = net\s\[&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;That, plus the comments from @skoelpin on the time format part should get your config working.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Mar 2018 17:12:55 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2018-03-07T17:12:55Z</dc:date>
    <item>
      <title>How to set a different time format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333993#M61758</link>
      <description>&lt;P&gt;I am trying to format the time that is in this format: [dd/mmyyyy HH:MM:SS GMT] when I set the time_prefi to a regex that contains [ it seems to stop the data from being indexed. When remove the settings it start collecting.&lt;/P&gt;

&lt;P&gt;I am guessing this is because a [ is regex command? Is another way to do this?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 15:25:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333993#M61758</guid>
      <dc:creator>pfabrizi</dc:creator>
      <dc:date>2018-03-07T15:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a different time format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333994#M61759</link>
      <description>&lt;P&gt;Can you provide a full data sample and your current props.conf configuration for your sourcetype?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 15:47:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333994#M61759</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-03-07T15:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a different time format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333995#M61760</link>
      <description>&lt;P&gt;Time_prefix is an attribute of base configs which should be applied to every sourcetype on the indexers. &lt;/P&gt;

&lt;P&gt;Time_prefix works by identifying where the timestamp is located in your logs so the TIME_FORMAT attribute can see what format the timestamp is in. &lt;/P&gt;

&lt;P&gt;There's 3 attributes that help get the timestamp correct for your specified sourcetype. An example would look like this &lt;/P&gt;

&lt;P&gt;03/01/2018 13:05:59 - INFO dfgdsfgdgerrfr&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype]
TIME_PREFIX = ^ 
TIME_FORMAT = %m/%d/%Y\s%H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 20
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Time_prefix shows where the sourcetype is in the logs&lt;BR /&gt;
TIME_format shows the format of the timestamp&lt;BR /&gt;
MAX_timestamp_lookahead identifies how far in your log Splunk should look to identify the timestamp.. Any props.conf changes on the indexer will require a splunkd restart &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:15:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333995#M61760</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2020-09-29T18:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a different time format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333996#M61761</link>
      <description>&lt;P&gt;so this is the event:&lt;BR /&gt;
Mar  7 11:43:30 xxxxxcxxxx.xxxx.net [07/03/2018: 16:43:29 GMT]&lt;/P&gt;

&lt;P&gt;stanza:&lt;BR /&gt;
TIME_PREFIX = net\s[&lt;BR /&gt;
TIME_FORMAT %d/%m/%Y: %H:%m:%S&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD = 20&lt;/P&gt;

&lt;P&gt;this was stopping index of these events. when I removed these from my stanza it would start again. I was not sure if '[' was causing an issue,&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:20:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333996#M61761</guid>
      <dc:creator>pfabrizi</dc:creator>
      <dc:date>2020-09-29T18:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a different time format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333997#M61762</link>
      <description>&lt;P&gt;Your TIME_FORMAT is wrong. Its missing an equal sign and the minute part is wrong&lt;/P&gt;

&lt;P&gt;It should look like this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;TIME_FORMAT = %d/%m/%Y: %H:%M:%S&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Your TIME_PREFIX is also wrong and should look like this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;TIME_PREFIX = net\s\[&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;You should not remove this as your putting more overhead on the indexer&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 16:51:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333997#M61762</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-03-07T16:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a different time format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333998#M61763</link>
      <description>&lt;P&gt;&lt;CODE&gt;[&lt;/CODE&gt; plays a special role in regular expressions, as the start of a character set notation (e.g. &lt;CODE&gt;[a-z]&lt;/CODE&gt;). So if you want to match the literal &lt;CODE&gt;[&lt;/CODE&gt; character, you need to escape it:&lt;BR /&gt;
&lt;CODE&gt;TIME_PREFIX = net\s\[&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;That, plus the comments from @skoelpin on the time format part should get your config working.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 17:12:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333998#M61763</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-03-07T17:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a different time format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333999#M61764</link>
      <description>&lt;P&gt;i had to have been missing something in my original attempt. my second attempt was what you have in there and it wasn't working. I fo have issue from time to time where a change requires me to restart splunk and not just deploy-server.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 17:56:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/333999#M61764</guid>
      <dc:creator>pfabrizi</dc:creator>
      <dc:date>2018-03-07T17:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a different time format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/334000#M61765</link>
      <description>&lt;P&gt;Your missing a lot more than just the TIME_PREFIX.. &lt;/P&gt;

&lt;P&gt;Before you continue using Splunk, you should really look into the Splunk education courses as this is very basic stuff &lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 17:58:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-set-a-different-time-format/m-p/334000#M61765</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-03-07T17:58:09Z</dc:date>
    </item>
  </channel>
</rss>

