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

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

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

Post 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.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

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

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

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

Post by eloyd »

Thanks. You can lock this.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Locked