Red Hat Bugzilla – Bug 1283618
Uptime of host report does not report minutes correctly
Last modified: 2016-02-10 14:19:07 EST
Created attachment 1096668 [details]
Description of problem:
In report regarding uptime of hosts uptime is displayed as hours and minutes, however minutes are all the time 0. And the uptime is moving only by hours.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Go to WA portal, hosts tab
2. Show report -> Single Host Uptime (BR8)
3. See minutes of report
11h 23m or just 11h.
Either display minutes correctly or remove 0m.
Since this does not reproduce in my environment, please help me to debug your report or give me access to the machine.
You can use https://wiki.icinga.org/display/howtos/Debugging+JasperServer
and follow step 2 (move sql query and input control values to DEBUG) and 3.
Then run the sql query from the jasperserver.log and replace the ? with corresponding input control values.
Let me know what value you get for uptime_mins.
This bug is not marked for z-stream, yet the milestone is for a z-stream version, therefore the milestone has been reset.
Please set the correct milestone or add the z-stream flag.
Minutes seems to be moved only by 60, which causes time to be in hours and no minutes.
planned_downtime_mins | unplanned_downtime_mins | uptime_mins | total
0 | 0 | 720.00 | 720.00
How are testing this?
Did you stop the host for a while and then restarted it
and checked the data after a few days?
Can I log into your test env?
Start DEBUG logs as per comment#2
Restart reportsd (just in case)
In webadmin portal rightclick host and show Uptime report.
Run sql command with 's/\?/$input_value/'
See output in comment#2
Hosts were in engine ~2 weeks, engine is older upgraded from older versions.
So I believe whole uptime_mins is measured incorrectly as hosts are in engine longer.
I'll send you login credentials to the engine via email.
After some investigation with Shirley:
Report is working correctly however problem is within the difference in aggregation timing and displaying of time.
In report obviously it is possible to display time like:
Uptime today: 5m
Downtime today: 12h55
When it's currently 13:00 that would be specific for today and it is displaying correct values.
However as aggregation of data which report BR8 is using is run hourly so the same 5m and 12h55, would be displayed if there would be at the moment 13:55 (in some cases even 14:05 as aggregation might be late for some reason ?!?)
I believe this is working by design, but the design is not really user friendly.
a) Get BR8 from data that are aggregated every minute. So the sum of uptime and downtime of host of today would be the current time.
b) Notify user in the report when was the aggregation run.
c) Show user only hours and trancate the minutes, so we will avoid confusion about missing time. (Still might get 1 missing hour and end of each hour because of the Sum of uptime and downtime)
Not sure if these are possible but I would prefer a > b, and considering C only if there is any other appropriate way how to get these values from other dashboards on current date (not historical data)
This is by design.
We will address this request in the metrics on 4.0.