Hi NAV gurus,
I noticed that some of the NAV log files use "local time" (here in California), 2017-12-07 15:56:13,973 [INFO] [nav.statemon.db] Returned 0 checkers
while the other use UTC+1 in time stamp: 2017-12-08 00:50:14,898 [INFO] [nav.snmptrapd] Snmptrapd started, listening on 0.0.0.0:162, [::]:162
What do I need to make all log files using the local time stamp?
Thank you.
Zhi-Wei Lu IET-CR-Network Operations Center University of California, Davis (530) 752-0155
On Thu, 7 Dec 2017 23:58:50 +0000 Zhi-Wei Lu zwlu@ucdavis.edu wrote:
I noticed that some of the NAV log files use "local time" (here in California), 2017-12-07 15:56:13,973 [INFO] [nav.statemon.db] Returned 0 checkers
while the other use UTC+1 in time stamp: 2017-12-08 00:50:14,898 [INFO] [nav.snmptrapd] Snmptrapd started, listening on 0.0.0.0:162, [::]:162
What do I need to make all log files using the local time stamp?
I'm guessing you didn't set your timezone in `nav.conf`? This defaults to `Europe/Oslo`, which is normally UTC+1.
On that note, it seems you found a bug :-) The TIME_ZONE setting in `nav.conf` is apparently not being respected by all NAV processes.
I've posted an issue here that we will look into: https://github.com/UNINETT/nav/issues/1639
Thank you, Morten!
Setting TIME_ZONE = US/Pacific fixed my problem. Apparently, there are a few logs ignore that setting, used the system default time zone instead. I can see the following logs with this bug: thresholdmon.log macwatch.log snmptrapd.log snmptraps.log ipdevpoll.log alertengine.log collect_active_ip.log
Thank you.
Zhi-Wei Lu IET-CR-Network Operations Center University of California, Davis (530) 752-0155
-----Original Message----- From: Morten Brekkevold [mailto:morten.brekkevold@uninett.no] Sent: Friday, December 08, 2017 2:17 AM To: Zhi-Wei Lu zwlu@ucdavis.edu Cc: nav-users@uninett.no Subject: Re: nav log time stamp issues: local time and UTC on different log files
On Thu, 7 Dec 2017 23:58:50 +0000 Zhi-Wei Lu zwlu@ucdavis.edu wrote:
I noticed that some of the NAV log files use "local time" (here in California), 2017-12-07 15:56:13,973 [INFO] [nav.statemon.db] Returned 0 checkers
while the other use UTC+1 in time stamp: 2017-12-08 00:50:14,898 [INFO] [nav.snmptrapd] Snmptrapd started, listening
on 0.0.0.0:162, [::]:162
What do I need to make all log files using the local time stamp?
I'm guessing you didn't set your timezone in `nav.conf`? This defaults to `Europe/Oslo`, which is normally UTC+1.
On that note, it seems you found a bug :-) The TIME_ZONE setting in `nav.conf` is apparently not being respected by all NAV processes.
I've posted an issue here that we will look into: https://github.com/UNINETT/nav/issues/1639
-- Morten Brekkevold UNINETT
On Fri, 8 Dec 2017 16:44:52 +0000 Zhi-Wei Lu zwlu@ucdavis.edu wrote:
Thank you, Morten!
No problem!
I can see the following logs with this bug: thresholdmon.log macwatch.log snmptrapd.log snmptraps.log ipdevpoll.log alertengine.log collect_active_ip.log
Thanks for the list, I've updated the issue with them.