Bug 1414379

Summary: Ovirt-dwh not populating dashboard graphs
Product: [oVirt] ovirt-engine-dwh Reporter: Andrea Ghelardi <a.ghelardi>
Component: GeneralAssignee: Shirly Radco <sradco>
Status: CLOSED NOTABUG QA Contact: Pavel Stehlik <pstehlik>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.0.5CC: a.ghelardi, bugs, sradco
Target Milestone: ovirt-4.0.7Flags: rule-engine: ovirt-4.0.z?
sradco: planning_ack?
sradco: devel_ack?
sradco: testing_ack?
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-25 12:08:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Metrics RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dwh logfile
none
engine log file
none
screenshot of the dashboard
none
File 1/4 of the requested dump file
none
File 2/4 of the requested dump file
none
File 3/4 of the requested dump file
none
File 4/4 of the requested dump file none

Description Andrea Ghelardi 2017-01-18 11:28:59 UTC
Created attachment 1242115 [details]
dwh logfile

Description of problem:
Ovirt Dashboard does not show little colored “cubes” which show storage, CPU and RAM usage history status.
This is a new installation (from scratch) with storages imported from a previous ovirt environment (v 3.5.6)


Version-Release number of selected component (if applicable):
4.0.5.5-1.el7.centos

How reproducible:
Log in to the main ovirt portal. Dashboard does not show dwh reports (see attached PNG)


Additional info:
Attaching snapshots and log files

Comment 1 Andrea Ghelardi 2017-01-18 11:30:07 UTC
Created attachment 1242116 [details]
engine log file

Comment 2 Andrea Ghelardi 2017-01-18 11:32:00 UTC
Created attachment 1242117 [details]
screenshot of the dashboard

Comment 3 Shirly Radco 2017-01-18 14:10:38 UTC
Please attach ovirt_engine_history db dump

Comment 4 Andrea Ghelardi 2017-01-18 14:51:21 UTC
hi Shirly,
could you please point me where to find it or, how to generate the dump file?
folder /var/lib/ovirt-engine/jboss_runtime/config/ovirt-engine_history/current/ is empty
thanks

Comment 5 Shirly Radco 2017-01-19 07:17:29 UTC
# su - postgres
$ pg_dump --file ovirt_engine_history.dump ovirt_engine_history

Comment 6 Andrea Ghelardi 2017-01-19 09:11:59 UTC
Created attachment 1242412 [details]
File 1/4 of the requested dump file

Comment 7 Andrea Ghelardi 2017-01-19 09:13:11 UTC
Created attachment 1242413 [details]
File 2/4 of the requested dump file

Comment 8 Andrea Ghelardi 2017-01-19 09:14:10 UTC
Created attachment 1242414 [details]
File 3/4 of the requested dump file

Comment 9 Andrea Ghelardi 2017-01-19 09:15:00 UTC
Created attachment 1242415 [details]
File 4/4 of the requested dump file

Dump file is huge (~440 MB) so I had to create a splitted zip archive. 
Attached all 4 files.

Comment 10 Shirly Radco 2017-01-23 09:22:10 UTC
Please try running on the ovirt_engine_history db:

UPDATE history_configuration set var_datetime =
date_trunc('hour', now())- interval '24 hour' WHERE var_name = 'lastHourAggr';

UPDATE history_configuration set var_datetime =
cast(now() as date)- interval '1 day' WHERE var_name = 'lastDayAggr';

Please wait for a few hours and see if data appears in the dashboards.

Can you please update what timezone your environment is set to?

Comment 11 Andrea Ghelardi 2017-01-23 09:48:23 UTC
Hello Shirly
Server timezone is CET
### Output of date command (we are in sync with NTP) ### 
[root@irdc-ovirtm02 ~]# date
Mon Jan 23 10:26:27 CET 2017
###

Executed commands as follows:
### Connected to Database ###
-bash-4.2$ psql -U postgres  ovirt_engine_history
psql (9.2.15)
Type "help" for help.
###

### Listed table before editing ###
ovirt_engine_history=# SELECT var_datetime FROM history_configuration;
      var_datetime
------------------------
 2017-01-23 01:00:00+00


 2016-10-03 12:43:20+00
 2017-01-23 11:00:00+00

(6 rows)
###

### Editing table ###
ovirt_engine_history=# UPDATE history_configuration set var_datetime =
ovirt_engine_history-# date_trunc('hour', now())- interval '24 hour' WHERE var_name = 'lastHourAggr';
UPDATE 1
ovirt_engine_history=# UPDATE history_configuration set var_datetime =
ovirt_engine_history-# cast(now() as date)- interval '1 day' WHERE var_name = 'lastDayAggr';
UPDATE 1
###

## Listing table values again (after update) ###
ovirt_engine_history=# SELECT var_datetime FROM history_configuration;
      var_datetime
------------------------


 2016-10-03 12:43:20+00
 2017-01-22 00:00:00+00

 2017-01-22 09:00:00+00
(6 rows)
###

I'll comment later today to let you know if data show up on dashboard
thanks

Comment 12 Andrea Ghelardi 2017-01-24 08:11:56 UTC
Hello Shirly,
I confirm that dashboard graphs are now correctly populated and issue is resolved on my side.
Thank you very much for your excellent support.
Cheers
Andrea

Comment 13 Sandro Bonazzola 2017-01-25 07:57:13 UTC
4.0.6 has been the last oVirt 4.0 release, please re-target this bug.