<?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: Splunk not applying time zone properly in clustered environment in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-not-applying-time-zone-properly-in-clustered-environment/m-p/184073#M36840</link>
    <description>&lt;P&gt;We have 2 log file sources and the time format is different in them. I have two stanzas in my props.conf under which we have defined TIME_FORMAT&lt;/P&gt;

&lt;P&gt;Log file time: 20-Mar-2013 23:59:59 UTC &lt;BR /&gt;
TIME_FORMAT is: %d-%b-%Y %H:%M:%S %z&lt;/P&gt;

&lt;P&gt;Log file time: 2013-12-17 08:00:02.140310 UTC &lt;BR /&gt;
TIME_FORMAT is: %Y-%m-%d %H:%M:%S.%6N %z&lt;/P&gt;

&lt;P&gt;MAX_TIMESTAMP_LOOKAHEAD is set properly for these time formats.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 16:46:19 GMT</pubDate>
    <dc:creator>strive</dc:creator>
    <dc:date>2020-09-28T16:46:19Z</dc:date>
    <item>
      <title>Splunk not applying time zone properly in clustered environment</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-not-applying-time-zone-properly-in-clustered-environment/m-p/184070#M36837</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;As per Splunk documentation, Splunk applies time zone in the following order&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Splunk Enterprise uses any time zone specified in raw event data (for example, PST, -0800).&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Splunk Enterprise uses the value of a TZ attribute set in props.conf, if the event matches the host, source, or source type specified by the stanza.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;If an event that arrives at an indexer originated at a forwarder, and both the forwarder and the receiving indexer run Splunk Enterprise 6.0 or later, then Splunk Enterprise uses the time zone that the forwarder provides.&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;In my clustered environment, it is always 3rd option. The first two has no effect in setting the timezone.&lt;/P&gt;

&lt;P&gt;The props.conf file is present in all slave nodes under /appName/local/ directory&lt;BR /&gt;&lt;BR /&gt;
My props.conf settings are:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mystanza]
TRUNCATE=0
SHOULD_LINEMERGE=false
LINE_BREAKER=([\r\n]+)\d{2}-[a-zA-Z]{3}-\d{4}\s\d{2}:\d{2}:\d{2}\s
MAX_TIMESTAMP_LOOKAHEAD=24
TIME_PREFIX=^
TIME_FORMAT=%d-%b-%Y %H:%M:%S %z
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The log line is&lt;/P&gt;

&lt;P&gt;20-Mar-2013 23:59:59 UTC DeviceName FileName|800|GET_PARAMETER rtsp://xx.xx.xx.xx:9100 RTSP/1.0&lt;/P&gt;

&lt;P&gt;I even tried using TZ=UTC but no avail.&lt;/P&gt;

&lt;P&gt;The forwarder is in IST and splunk always uses that timezone.&lt;/P&gt;

&lt;P&gt;We have 2 log file sources and the time format is different in them. I have two stanzas in my props.conf under which we have defined TIME_FORMAT&lt;/P&gt;

&lt;P&gt;Log file time: 20-Mar-2013 23:59:59 UTC&lt;BR /&gt;&lt;BR /&gt;
TIME_FORMAT is: %d-%b-%Y %H:%M:%S %z&lt;/P&gt;

&lt;P&gt;Log file time: 2013-12-17 08:00:02.140310 UTC&lt;BR /&gt;&lt;BR /&gt;
TIME_FORMAT is: %Y-%m-%d %H:%M:%S.%6N %z&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt; is set properly for these time formats.&lt;/P&gt;

&lt;P&gt;Please let me know how to set the timezone as per log events.&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;
Strive&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2014 14:48:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-not-applying-time-zone-properly-in-clustered-environment/m-p/184070#M36837</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-05-30T14:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk not applying time zone properly in clustered environment</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-not-applying-time-zone-properly-in-clustered-environment/m-p/184071#M36838</link>
      <description>&lt;P&gt;There an error in your timeformat : day-month-year instead of year-month-day. Therefore the format is never matching&lt;/P&gt;

&lt;P&gt;you want to try :&lt;BR /&gt;
TIME_FORMAT=%Y-%b-%d %H:%M:%S %z&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2014 18:51:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-not-applying-time-zone-properly-in-clustered-environment/m-p/184071#M36838</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-05-30T18:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk not applying time zone properly in clustered environment</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-not-applying-time-zone-properly-in-clustered-environment/m-p/184072#M36839</link>
      <description>&lt;P&gt;I am sorry. I put wrong log line there as example. I will edit my question.&lt;/P&gt;</description>
      <pubDate>Sat, 31 May 2014 05:26:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-not-applying-time-zone-properly-in-clustered-environment/m-p/184072#M36839</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-05-31T05:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk not applying time zone properly in clustered environment</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-not-applying-time-zone-properly-in-clustered-environment/m-p/184073#M36840</link>
      <description>&lt;P&gt;We have 2 log file sources and the time format is different in them. I have two stanzas in my props.conf under which we have defined TIME_FORMAT&lt;/P&gt;

&lt;P&gt;Log file time: 20-Mar-2013 23:59:59 UTC &lt;BR /&gt;
TIME_FORMAT is: %d-%b-%Y %H:%M:%S %z&lt;/P&gt;

&lt;P&gt;Log file time: 2013-12-17 08:00:02.140310 UTC &lt;BR /&gt;
TIME_FORMAT is: %Y-%m-%d %H:%M:%S.%6N %z&lt;/P&gt;

&lt;P&gt;MAX_TIMESTAMP_LOOKAHEAD is set properly for these time formats.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:46:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-not-applying-time-zone-properly-in-clustered-environment/m-p/184073#M36840</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2020-09-28T16:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk not applying time zone properly in clustered environment</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-not-applying-time-zone-properly-in-clustered-environment/m-p/184074#M36841</link>
      <description>&lt;P&gt;As per our tests, the following is the conclusion&lt;BR /&gt;
1. While using heavy weight forwarder, If we set time on all our VMs as UTC then there is no issue in time zone setting for log events&lt;BR /&gt;
2. If we use universal forwarder then we need not set time on our VMs as UTC. It can be local time zone. In this case whatever splunk documentation says about applying time zones, works properly.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jun 2014 14:17:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-not-applying-time-zone-properly-in-clustered-environment/m-p/184074#M36841</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-06-22T14:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk not applying time zone properly in clustered environment</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-not-applying-time-zone-properly-in-clustered-environment/m-p/184075#M36842</link>
      <description>&lt;P&gt;When HWF is used, use props and tranforms on fwd. This works fine and solved our issues&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2014 23:02:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-not-applying-time-zone-properly-in-clustered-environment/m-p/184075#M36842</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-07-16T23:02:38Z</dc:date>
    </item>
  </channel>
</rss>

