Error Getting metrics from oVirt based platform


I have a Hybrid cloud with Openstack and oVirt as a Infra and Cloud providers, when manageIQ try to get the metrics from Openstack, it is perfect, no error there, but when try to get performance metrics from oVirt VMs, this error appears:

[----] E, [2015-04-07T14:57:46.053420 #2369:11d1810] ERROR – : MIQ(abstract_adapter) Name: [OvirtMetrics::DisksVmMap Load], Message: [PGError: ERROR: permiso denegado a la relación disks_vm_map
[----] E, [2015-04-07T14:57:46.053628 #2369:11d1810] ERROR – : MIQ(VmRedhat.perf_collect_metrics) [realtime] for: [VmRedhat], [191], [funciona81] Unhandled exception during perf data collection: [Database statement error encountered], class: [ActiveRecord::StatementInvalid]
[----] E, [2015-04-07T14:57:46.053757 #2369:11d1810] ERROR – : MIQ(VmRedhat.perf_collect_metrics) [realtime] for: [VmRedhat], [191], [funciona81] Timings at time of error: {:capture_state=>0.0017001628875732422, :rhevm_connect=>0.07741832733154297, :collect_data=>1.0209484100341797}
[----] E, [2015-04-07T14:57:46.053926 #2369:11d1810] ERROR – : [ActiveRecord::StatementInvalid]: Database statement error encountered Method:[rescue in perf_collect_metrics_rhevm]
[----] E, [2015-04-07T14:57:46.054048 #2369:11d1810] ERROR – : /opt/rh/ruby193/root/usr/local/share/gems/bundler/gems/rails-f9749c2ef83b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:1348:in async_exec'* *[----] E, [2015-04-07T14:57:46.054384 #2369:11d1810] ERROR -- : MIQ(MiqQueue.deliver) Message id: [1547135], Error: [Database statement error encountered]* *[----] E, [2015-04-07T14:57:46.054551 #2369:11d1810] ERROR -- : [ActiveRecord::StatementInvalid]: Database statement error encountered Method:[rescue in deliver]* *[----] E, [2015-04-07T14:57:46.054724 #2369:11d1810] ERROR -- : /opt/rh/ruby193/root/usr/local/share/gems/bundler/gems/rails-f9749c2ef83b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:1348:inasync_exec’

ManageIQ Version: anand-1.20150407063819_ea4c62a
oVirt Version: oVirt:

Any ideas about this error?

Thanks in advance

Best regards

Juan Manuel Parrilla

Sounds like the user you are giving as credentials for the rhevm metrics database does not have permissions to see the tables needed. In particular, disks_vm_map.

1 Like

Its weird, because I validate the access to the C&U Database, I am using “engine” user to access to C & U DB of RHEV.

Thanks for the guidance :), I will try to access manually to check it.

Thanks Fryguy :smile:

Best regards

wow… it seems that this table does not exists on Engine DB:

public | cpu_profiles | table | engine
public | custom_actions | table | engine
public | disk_image_dynamic | table | engine
public | disk_lun_map | table | engine
public | disk_profiles | table | engine
public | dwh_history_timekeeping | table | engine
public | dwh_osinfo | table | engine
public | event_map | table | engine

The table disk_vm_map its on “ovirt_engine_history” DB, then this is the reason.

You was right Fryguy Thanks again for the clue :wink:

Best regards

The best way to solve the problem is following this documentation:

Enjoy :wink:

Do you need the ovirt-dwh module installed for this to work?


On 4 oVirt setups, 3 of them had DWH installed, and the fourth one had not, and was showing an issue when trying to authenticate on the “C & U” tab, though I had followed Redhat’s instructions regarding account creation and postgresql settings.
After having installed ovirt-engine-dwh and run engine-setup, the C& U connection worked.

I consider it too bad this error message is misleading and should be corrected.

1 Like