Recurring downtime scheduling for wrong dates

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Recurring downtime scheduling for wrong dates

Post 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
User avatar
Nagios Support
Posts: 36
Joined: Thu Sep 04, 2014 12:16 pm

Re: Recurring downtime scheduling for wrong dates

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Recurring downtime scheduling for wrong dates

Post by rkennedy »

5.2.4 was released, give it a try and let us know if this fixes your issue.
Former Nagios Employee
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Recurring downtime scheduling for wrong dates

Post 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
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Recurring downtime scheduling for wrong dates

Post 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.
Former Nagios Employee
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Recurring downtime scheduling for wrong dates

Post 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
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Recurring downtime scheduling for wrong dates

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Ivica Mustapic
Posts: 31
Joined: Thu Jun 13, 2013 1:06 am

Re: Recurring downtime scheduling for wrong dates

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Recurring downtime scheduling for wrong dates

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Ivica Mustapic
Posts: 31
Joined: Thu Jun 13, 2013 1:06 am

Re: Recurring downtime scheduling for wrong dates

Post 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
Locked