Page 4 of 5

Re: Recurring downtime scheduling for wrong dates

Posted: Wed Feb 17, 2016 9:54 pm
by Fred Kroeger
Update
The patch you supplied works correctly when used from the Scheduled Downtime Link.
Recurring Downtime works correctly (only tested on servers where I have installed the patch)
Still not working when you try to schedule downtime using the link via the Advanced Tab on the Host/Service Details Page - it shows DD/MM but you need to change it to MM/DD for it to work.

BTW - found a typo in the Nagios error message - when you enter an invalid date format a red Window pops up with the text

Code: Select all

 "Something went wrong with the commad submitted to Nagios Core.”
Should be "command"

regards... Fred

Re: Recurring downtime scheduling for wrong dates

Posted: Thu Feb 18, 2016 4:19 pm
by Nagios Support
This bug should have been fixed. It is possible that somehow the last mods were not committed. We are looking into this as we speak, and will get back to you as soon as we find out what is causing the issue.

Re: Recurring downtime scheduling for wrong dates

Posted: Fri Feb 19, 2016 10:58 am
by rkennedy
5.2.4 was released, give it a try and let us know if this fixes your issue.

Re: Recurring downtime scheduling for wrong dates

Posted: Wed Feb 24, 2016 4:49 am
by Fred Kroeger
I see you've jumped straight to 5.2.5 !
I haven't been able to update to the new version but just found a problem with the patch - so if you've used that code in the new release there may still be problems.

The date is OK now but it appears that it is add 12 hours to the downtime
This is what I set it to:
Downtime-Set.PNG
This is what it does:
Downtime-View.PNG
Until now, the only time I have tested this is before noon - so there may be an issue if the time as after 12 ?

regrads... Fred

Re: Recurring downtime scheduling for wrong dates

Posted: Wed Feb 24, 2016 3:29 pm
by rkennedy
We actually went to 5.2.4, and then realized there was an issue with PHP versions. Then, 5.2.5 was born -
5.2.5 - 02/19/2016
==================
- Fixed solution to downtime only working on PHP versions 5.3.x -JO


5.2.4 - 02/18/2016
==================
The update does include more then just this patch. As you are still having issues, please update when you get a chance. Let us know if you're still experiencing issues.

Re: Recurring downtime scheduling for wrong dates

Posted: Wed Feb 24, 2016 8:02 pm
by Fred Kroeger
OK - Upgraded to 5.2.5 and still having a problem with Downtime now adding 14 hours to the schedule.
Had a closer look and I think I found the problem. It appears that /etc/locatime was changed when I upgraded to 5.2.3 last week.
I know this because I always link the localtime file - never copy it.
This is what it was this morning.

Code: Select all

[# ls -la /etc/localtime
-rw-r--r-- 1 root root 3543 Feb 21 20:01 /etc/localtime
# strings /etc/localtime
TZif2
Dp/~Y
&p1gv
p3GX
p5':
CdopD/
EDQpE
NpM|y
0pO\[
pQ<=
ypb-
cg[pd
eG=pe
Jp|~u
,p~^W
TZif2
Cdop
EDQp
cg[p
eG=p
CST6CDT,M3.2.0,M11.1.0
I've updated the file and downtime is now working as expected via the Scheduled Downtime link and via the Advanced Tab

Code: Select all

# ls -la /etc/localtime
lrwxrwxrwx 1 root root 35 Feb 25 08:31 /etc/localtime -> /usr/share/zoneinfo/Australia/Perth
Why was the localtime file changed during the update ?

regards... Fred

Re: Recurring downtime scheduling for wrong dates

Posted: Thu Feb 25, 2016 1:48 pm
by lmiltchev
Fred, I am not sure why the localtime settings would change. I spoke to our developers, and they said that we are not changing/modifying system time settings in any way.
I can't recreate the issue, either. I set up an old test XI box with EST timezone, then upgraded to the latest. My settings didn't change at all.

Here's what I have after the upgrade (same as before the upgrade):

Code: Select all

[root@localhost nagiosxi]# strings /etc/localtime
TZif2
6`/~Kp0
`1gg
`3GI
`5'+
pCda`D/vpEDC`E
@`M|kpN
"`O\MpP
`Q</pRu
k`b-
pcgM`d
xpeG/`e
Zpg'
<`|~gp}
`~^Ip
TZif2
/~Kp
Cda`
D/vp
EDC`
M|kp
O\Mp
Q</p
cgM`
eG/`
|~gp
~^Ip
EST5EDT,M3.2.0,M11.1.0

grep timezone /etc/php.ini
; Defines the default timezone used by the date functions
date.timezone = America/New_York

cat /etc/sysconfig/clock
ZONE="America/New_York"
UTC=true
ARC=false

date
Thu Feb 25 13:48:29 EST 2016

Re: Recurring downtime scheduling for wrong dates

Posted: Thu Feb 25, 2016 9:06 pm
by Ivica Mustapic
Guys,

The Downtime Scheduling bug is present on my system too.
Just did the upgrade to v5.2.5 but it did not revolve this bug.

This bug has started after our upgrade from v5.2.2 to v5.2.3.

Cheers,
Ivica

Re: Recurring downtime scheduling for wrong dates

Posted: Fri Feb 26, 2016 11:12 am
by lmiltchev
Ivica Mustapic, was the "old" instance of XI a "source" install or one of our VMs? Did you upgrade to Nagios XI 5.2.5 from the web UI or CLI? Are both date formats (under user's settings & system settings) set as YYYY-MM-DD? What is the output of the following commands?

Code: Select all

uname -a
cat /etc/*release
date
ls -la /etc/localtime
strings /etc/localtime | tail -1
grep "date.timezone =" /etc/php.ini
grep -i zone /etc/sysconfig/clock
locale

Re: Recurring downtime scheduling for wrong dates

Posted: Mon Feb 29, 2016 12:39 am
by Ivica Mustapic
Hi there,

Our instance of XI was one of your VMs from a few years ago and it has been running all this time (and kept updated).
All of the updates are normally done via command line but the last one was done via web interface (v5.2.5).
Problem started after the upgrade to v5.2.3 via command line.

All date formats (that I could find) are set to YYYY-MM-DD HH:MM:SS.

Here is the output you requested:

(01:22 PM)-> uname -a
Linux vsmurprdnag01.wesenergy.local 2.6.32-573.8.1.el6.x86_64 #1 SMP Tue Nov 10 18:01:38 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


(01:22 PM)-> cat /etc/*release
CentOS release 6.7 (Final)
CentOS release 6.7 (Final)
CentOS release 6.7 (Final)


(01:22 PM)-> date
Mon Feb 29 13:22:57 AWST 2016


(01:22 PM)-> ls -la /etc/localtime
lrwxrwxrwx 1 root root 35 Jan 8 2013 /etc/localtime -> /usr/share/zoneinfo/Australia/Perth


(01:22 PM)-> strings /etc/localtime | tail -1
AWST-8


(01:22 PM)-> grep "date.timezone =" /etc/php.ini
;#date.timezone = America/Chicago
date.timezone = Australia/Perth


(01:22 PM)-> grep -i zone /etc/sysconfig/clock
ZONE="Australia/Perth"


(01:22 PM)-> locale
LANG=en_AU.UTF-8
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE="en_AU.UTF-8"
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=


Cheers,
Ivica