<?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: Timestamps not recognised correctly in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85336#M17758</link>
    <description>&lt;P&gt;Hi! Thanks for your answer.&lt;/P&gt;

&lt;P&gt;About 1) Please check my config file again, I just made an update. I tried with and without ":" character.&lt;/P&gt;

&lt;P&gt;About 2) I am already setting the &lt;CODE&gt;sourcetype&lt;/CODE&gt; in inputs.conf, can you please re-check, and tell me if its misplaced somehow?&lt;/P&gt;

&lt;P&gt;About 3) How should I figure out if the forwarder is heavy/non-heavy? Also, if the forwarder is non-heavy, and the central server parses the files, does that mean I have to put the *.conf in the main server?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Oct 2013 15:07:44 GMT</pubDate>
    <dc:creator>SRIVATSAN_IYER</dc:creator>
    <dc:date>2013-10-07T15:07:44Z</dc:date>
    <item>
      <title>Timestamps not recognised correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85334#M17756</link>
      <description>&lt;P&gt;I am quite new to Splunk. I'd be really grateful if you could point me towards the fix of the problem.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt; : I have a splunk forwarder set up on another machine that forwards the logs in realtime to a central splunk server.&lt;/P&gt;

&lt;P&gt;Below are the configurations ( &lt;STRONG&gt;&lt;EM&gt;on the forwarder machine&lt;/EM&gt;&lt;/STRONG&gt; ) and an example log file structure&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;&lt;STRONG&gt;Log File Structure Example&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2013-10-07:04:00:26,x.y.z.w| x.y.z.w| a.b.c.d,11977EA89F5CC5,1381118419818,1381118426978,62B55DF2C81A,No Facility,SUCCESS,Transaction completed successfully.
2013-10-07:11:43:23,x.y.z.w| x.y.z.w| a.b.c.d,1209A270E6F5BF,1381146195657,1381146203190,62B55DF2C81A,No Facility,SUCCESS,Transaction completed successfully.
2013-10-07:13:27:12,x.y.z.w| x.y.z.w| a.b.c.d,EC3F8D2FFE67,1381152428564,1381152432796,62B55DF2C81A,No Facility,SUCCESS,Transaction completed successfully.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;splunkforwarder/etc/system/local/inputs.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
host = ip-x-y-z-w

[monitor:///home/jboss/jboss-as-7.1.1.Final/standalone/log/xyzlog/transactions.log]
sourcetype = XYZ_TRANSACTIONS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;splunkforwarder/etc/system/local/props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[XYZ_TRANSACTIONS]
SHOULD_LINEMERGE = False
MAX_TIMESTAMP_LOOKAHEAD=150
NO_BINARY_CHECK=1
#TIME_FORMAT=%Y-%m-%d %H:%M:%S        # I tried both with and w/o ":" between the date and time part; doesn't work.
TRANSFORMS-Transaction_Timestamp=Transaction_Timestamp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;splunkforwarder/etc/system/local/props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[Transaction_Timestamp]
DEST_KEY = _time
REGEX = (\d{4}-\d{2}-\d{2}):(\d{2}:\d{2}:\d{2})
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;&lt;STRONG&gt;Problem&lt;/STRONG&gt;&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Splunk parses the timestamp string &lt;CODE&gt;2013-10-07:14:06:30&lt;/CODE&gt; as &lt;CODE&gt;10/7/13 7:14:06.300 AM&lt;/CODE&gt;.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;STRONG&gt;What I tried:&lt;/STRONG&gt;&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Initially, there was no &lt;CODE&gt;sourcetype&lt;/CODE&gt; at all. I used to build dashboard (forms) around queries which used to start like "source=....". (This was where the problem started: I found out that Splunk was parsing the time wrongly)&lt;/LI&gt;
&lt;LI&gt;I then used &lt;CODE&gt;sourcetype&lt;/CODE&gt; specification in &lt;CODE&gt;inputs.conf&lt;/CODE&gt; file, and specified the corresponding properties for the source type in &lt;CODE&gt;props.conf&lt;/CODE&gt; file. One on the properties I used was &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt;. This is shown as commented above.  (There was no change in the final timestamp recognition)&lt;/LI&gt;
&lt;LI&gt;I tried to make a transform by replacing the ":" that appears after the date part with a space. I now added &lt;CODE&gt;transforms.conf&lt;/CODE&gt;. Result: No change. I tried removing the &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; from &lt;CODE&gt;props.conf&lt;/CODE&gt;. Result: No change.&lt;/LI&gt;
&lt;LI&gt;I tried to add a Data Input (of a few lines of the same log file) from Web UI on my main splunk server. The props.conf file it generates does not have &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; and is also able to recognize time correctly. I tried setting the TIME_FORMAT of &lt;CODE&gt;%Y-%m-%d %H:%M:%S&lt;/CODE&gt; (which I have in props.conf), splunk server was able to recognize the timestamp from sample log file perfectly.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Splunk Server version: 5.0.4, build 172409&lt;BR /&gt;
Splunk forwarder version: Splunk Universal Forwarder 5.0.4 (build 172409)&lt;/P&gt;

&lt;P&gt;The only problem is that Splunk forwarder doesn't seem to use those properties I am specifying. Am I doing something wrong? Can this be improved? Is there a way I can fix this problem?&lt;/P&gt;

&lt;P&gt;Please let me know if you need any further info about the environment/configurations/etc. Thanks.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;@Sowing mentions about heavy/light/universal forwarders. From the answers mentioned &lt;A href="http://answers.splunk.com/answers/63247/how-to-tell-what-kind-of-forwarders-in-the-environment" target="_blank"&gt;here about finding the type of forwarder&lt;/A&gt;, I tried a search query like: "index=_internal source=*metrics.log group=tcpin_connections". I find that most of the results have "fwdType=uf". From this I understand that its a universal forwarder thats forwarding the above logs. Any pointers from here ?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 14:54:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85334#M17756</guid>
      <dc:creator>SRIVATSAN_IYER</dc:creator>
      <dc:date>2020-09-28T14:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps not recognised correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85335#M17757</link>
      <description>&lt;P&gt;1) Your TIME_FORMAT needs the colon between the date and the time.&lt;/P&gt;

&lt;P&gt;2) If the forwarder doesn't have a monitor:// declaration that sets a sourcetype, it will attempt to figure one out before sending the data to the indexer. It may not be choosing the correct name (XYZ_TRANSACTIONS), so when the data arrives, it's left to the default parsing rules. Adding the sourcetype key = value pair to your inputs.conf on the forwarder should be enough.&lt;/P&gt;

&lt;P&gt;3) If the forwarder is a heavy forwarder (i.e., a full instance of Splunk), it's doing the parsing &lt;EM&gt;there&lt;/EM&gt;, rather than waiting for the indexer to do it.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2013 14:55:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85335#M17757</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-10-07T14:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps not recognised correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85336#M17758</link>
      <description>&lt;P&gt;Hi! Thanks for your answer.&lt;/P&gt;

&lt;P&gt;About 1) Please check my config file again, I just made an update. I tried with and without ":" character.&lt;/P&gt;

&lt;P&gt;About 2) I am already setting the &lt;CODE&gt;sourcetype&lt;/CODE&gt; in inputs.conf, can you please re-check, and tell me if its misplaced somehow?&lt;/P&gt;

&lt;P&gt;About 3) How should I figure out if the forwarder is heavy/non-heavy? Also, if the forwarder is non-heavy, and the central server parses the files, does that mean I have to put the *.conf in the main server?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2013 15:07:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85336#M17758</guid>
      <dc:creator>SRIVATSAN_IYER</dc:creator>
      <dc:date>2013-10-07T15:07:44Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps not recognised correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85337#M17759</link>
      <description>&lt;P&gt;Since you indicate that the forwarders are universal, they are doing &lt;EM&gt;no&lt;/EM&gt; parsing of the data. The TIME_FORMAT, etc, will be ignored on that host. These props.conf and transforms.conf entries should be on the indexer host.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2013 16:25:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85337#M17759</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-10-07T16:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps not recognised correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85338#M17760</link>
      <description>&lt;P&gt;@Sowings I will give that a shot. Thanks! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2013 16:26:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85338#M17760</guid>
      <dc:creator>SRIVATSAN_IYER</dc:creator>
      <dc:date>2013-10-07T16:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps not recognised correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85339#M17761</link>
      <description>&lt;P&gt;1) Use TIME_FORMAT; trying to set DEST_KEY of _time in transforms is not likely to work.&lt;/P&gt;

&lt;P&gt;2) Inputs.conf is fine.&lt;/P&gt;

&lt;P&gt;3) The configs for parsing (the props.conf from the forwarder) should be on the indexer.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2013 16:27:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85339#M17761</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-10-07T16:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps not recognised correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85340#M17762</link>
      <description>&lt;P&gt;&lt;A href="http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings"&gt;http://wiki.splunk.com/Where_do_I_configure_my_Splunk_settings&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;always useful.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2013 19:04:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85340#M17762</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-10-07T19:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps not recognised correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85341#M17763</link>
      <description>&lt;P&gt;@sowings +1. Thanks a ton! :). Having props.conf in the central indexer fixed it.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2013 08:54:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85341#M17763</guid>
      <dc:creator>SRIVATSAN_IYER</dc:creator>
      <dc:date>2013-10-09T08:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Timestamps not recognised correctly</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85342#M17764</link>
      <description>&lt;P&gt;@kristian.kolb Thanks for the link &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2013 08:55:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timestamps-not-recognised-correctly/m-p/85342#M17764</guid>
      <dc:creator>SRIVATSAN_IYER</dc:creator>
      <dc:date>2013-10-09T08:55:03Z</dc:date>
    </item>
  </channel>
</rss>

