<?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: Timezone not working in syslog in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146831#M29911</link>
    <description>&lt;P&gt;A quick question, do you have a good reason for setting the timezone of those remote servers to local AU time rather than just leaving them alone?&lt;/P&gt;

&lt;P&gt;In general, it is better to leave their timezones as the timezone from where the host from which the events are generated actually is.&lt;/P&gt;

&lt;P&gt;The search head itself will translate those times to a locally displayed timezone as per their login preferences automatically. The raw event will still have their local time preserved.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Dec 2014 04:44:55 GMT</pubDate>
    <dc:creator>Lucas_K</dc:creator>
    <dc:date>2014-12-08T04:44:55Z</dc:date>
    <item>
      <title>Timezone not working in syslog</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146828#M29908</link>
      <description>&lt;P&gt;I have setup a syslog forwarding (TCP and UDP) on few servers. The servers are using various time zones - New York, New Jersey, London and HK.&lt;/P&gt;

&lt;P&gt;I've been trying to set all the timezone to local - Australia/Sydney but I can't get it work. Can anyone please help? I have the following setup in place:&lt;/P&gt;

&lt;P&gt;in inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[tcp://IP:2517]
disabled = false
sourcetype = syslog
index = index_name
host = host_name
connection_host = none
source = server_forwarder:tcp:2517
persistentQueueSize=500MB

[udp://IP:2517]
disabled = false
sourcetype = syslog
index = index_name
host = host_name
connection_host = none
no_appending_timestamp = true
source = server_forwarder:udp:2517
persistentQueueSize=500MB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[host::host_name]
TZ = Australia/Sydney
TZ_ALIAS = EST=GMT+10:00
TRANSFORMS-syslogseta = send_to_seta

Also tried without the alias

[host::host_name]
TZ = Australia/Sydney
TRANSFORMS-syslogseta = send_to_set
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# sends logs out via syslog to SETA
[send_to_seta]
SOURCE_KEY = _MetaData:Index
REGEX = index_name
DEST_KEY = _SYSLOG_ROUTING
FORMAT = prod_seta_group
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Dec 2014 03:18:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146828#M29908</guid>
      <dc:creator>erwinpastor</dc:creator>
      <dc:date>2014-12-08T03:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone not working in syslog</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146829#M29909</link>
      <description>&lt;P&gt;By the way, I also tried by source instead of host but it still don't work.&lt;/P&gt;

&lt;P&gt;[source::server_forwarder:udp:2517]&lt;BR /&gt;
TZ = Australia/Sydney&lt;/P&gt;

&lt;P&gt;[source::server_forwarder:tcp:2517]&lt;BR /&gt;
TZ = Australia/Sydney&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2014 03:50:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146829#M29909</guid>
      <dc:creator>erwinpastor</dc:creator>
      <dc:date>2014-12-08T03:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone not working in syslog</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146830#M29910</link>
      <description>&lt;P&gt;can you use btool and check if your configuration is working...&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2014 04:41:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146830#M29910</guid>
      <dc:creator>kml_uvce</dc:creator>
      <dc:date>2014-12-08T04:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone not working in syslog</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146831#M29911</link>
      <description>&lt;P&gt;A quick question, do you have a good reason for setting the timezone of those remote servers to local AU time rather than just leaving them alone?&lt;/P&gt;

&lt;P&gt;In general, it is better to leave their timezones as the timezone from where the host from which the events are generated actually is.&lt;/P&gt;

&lt;P&gt;The search head itself will translate those times to a locally displayed timezone as per their login preferences automatically. The raw event will still have their local time preserved.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2014 04:44:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146831#M29911</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2014-12-08T04:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone not working in syslog</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146832#M29912</link>
      <description>&lt;P&gt;we have to translate all of the other region’s server syslog to Sydney time so that we can co-relate them for the events.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2014 05:42:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146832#M29912</guid>
      <dc:creator>erwinpastor</dc:creator>
      <dc:date>2014-12-08T05:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone not working in syslog</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146833#M29913</link>
      <description>&lt;P&gt;Yeah, no unusual results when I run &lt;CODE&gt;./splunk btool check --debug&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2014 05:45:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146833#M29913</guid>
      <dc:creator>erwinpastor</dc:creator>
      <dc:date>2014-12-08T05:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone not working in syslog</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146834#M29914</link>
      <description>&lt;P&gt;You don't need to do that. The web interface will automatically do that if your time stamps and time zones are right.&lt;/P&gt;

&lt;P&gt;ie. a search for events in the past hour will find both events from a sydney box @ 4:45pm 8/12/2014 AND london (5:45am 8/12/2014 local london time).&lt;/P&gt;

&lt;P&gt;As your web interface is set to EDST you'll see both events with 4:45pm _time fields automatically (raw event time on the london event will be 5:45am).&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2014 05:50:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146834#M29914</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2014-12-08T05:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone not working in syslog</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146835#M29915</link>
      <description>&lt;P&gt;I did remove the TZ settings and I don't see the time fields in AU/Sydney time.&lt;/P&gt;

&lt;P&gt;Sample search result for London server&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;12/8/14
6:14:28.800 AM  
2014-12-08 06:14:28,8 ... Common.Request-Timestamp=2014-12-08 06:13:26+00,
host = ... source = ... sourcetype = syslog

12/8/14 
6:14:28.800 AM  
2014-12-08 06:14:28,8  ... Common.Request-Timestamp=2014-12-08 06:12:56+00,
host = ... source = ... sourcetype = syslog
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search head server date:&lt;BR /&gt;
[splunkp@ /]$ date&lt;BR /&gt;
Mon Dec  8 17:16:47 EST 2014&lt;/P&gt;

&lt;P&gt;Am I missing something?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2014 06:19:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146835#M29915</guid>
      <dc:creator>erwinpastor</dc:creator>
      <dc:date>2014-12-08T06:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone not working in syslog</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146836#M29916</link>
      <description>&lt;P&gt;ahh want a field name as your time. This is totally different. &lt;/P&gt;

&lt;P&gt;You have a couple of choices (unless someone has a better idea).&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; You can index them with that time as the _time field at index time via props.conf&lt;BR /&gt;
so something like :&lt;/P&gt;

&lt;P&gt;example.&lt;BR /&gt;
[host::my_london_host]&lt;BR /&gt;
TIME_PREFIX = Common.Request-Timestamp=&lt;BR /&gt;
TIME_FORMAT = %Y-%m-%d %H:%M:%S%z&lt;/P&gt;

&lt;P&gt;You could probably use a nice regex instead of the "Common.Request".&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Pros:&lt;/STRONG&gt; search time frame will catch all your events.&lt;BR /&gt;
&lt;STRONG&gt;Cons:&lt;/STRONG&gt; You've modified your original events.&lt;/P&gt;

&lt;P&gt;OR &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; You can modify it at search time by renaming your Common.Request-Timestamp field to _time.&lt;BR /&gt;
Example.&lt;BR /&gt;
| eval new_time=strptime(Common.Request-Timestamp, "%Y-%m-%d %H:%M:%S%z") |  eval new_epoch=strftime(new_time, "%s") | rename _time AS old_time | rename new_epoch AS _time&lt;BR /&gt;
&lt;STRONG&gt;Pros:&lt;/STRONG&gt; Original event is left intact.&lt;BR /&gt;
&lt;STRONG&gt;Cons:&lt;/STRONG&gt; Your base search will have to be large enough to include these events. You'll have to eval that time into epoch first and then rename to _time.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:20:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146836#M29916</guid>
      <dc:creator>Lucas_K</dc:creator>
      <dc:date>2020-09-28T18:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Timezone not working in syslog</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146837#M29917</link>
      <description>&lt;P&gt;Thanks Lucas K. I have overridden the date entry with something like you recommended and got the expected results.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2014 13:54:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Timezone-not-working-in-syslog/m-p/146837#M29917</guid>
      <dc:creator>erwinpastor</dc:creator>
      <dc:date>2014-12-09T13:54:22Z</dc:date>
    </item>
  </channel>
</rss>

