Page 1 of 1

"This week" is not accurate with respect to clock time

Posted: Sun Aug 21, 2016 8:12 pm
by eloyd
It looks as though the "this week" report in XI Reports is broken if you're looking on a Sunday. First, it assumes your week starts on a Sunday (or maybe there's a setting somewhere that I missed, but I don't think so). Second, I'm running a report at ~9:10pm on a Sunday evening, showing the report for "This week." Here is the time frame that Nagios chose for me:

Code: Select all

Availability Summary
Report covers from: 2016-08-14 00:00:00 to 2016-08-21 21:10:18
That's last Sunday at midnight (Saturday night) to this Sunday (today) at the current time. That's 189 hours, which is more than the 168 hours that are in 7 days.

If I choose "last week" I get this range:

Code: Select all

Availability Summary
Report covers from: 2016-08-07 00:00:00 to 2016-08-14 00:00:00
That's last Sunday at midnight to today at midnight, which is correct - 168 hours or one week.

So the calculations for "this week" are wrong. I haven't had the chance to test to see what happens when I run the report tomorrow at noon, but I'll find out. Basically, the "this week" report" should either start at the most recent Sunday at 00:00:00, or else it's calculating "the most recent seven days," but doing the calculation incorrectly. Either way, it's not 100% accurate.

Re: "This week" is not accurate with respect to clock time

Posted: Mon Aug 22, 2016 9:58 am
by lmiltchev
I was able to recreate the issue, and filed an internal bug report -NEW TASK ID 9357 created - Nagios XI Bug Report: Nagios XI - "This week" availability report is wrong if you run it on Sunday. It seems like the report is looking for "LAST sunday", which works as expected if you run the report any other day of the week but Sunday". When you run the report on Sunday, it uses the previous week's Sunday.

Re: "This week" is not accurate with respect to clock time

Posted: Mon Aug 22, 2016 10:07 am
by eloyd
Thanks. You can lock this.