diff --git a/app/models/vim_performance_state.rb b/app/models/vim_performance_state.rb index b329c64768b6..e6fee68173eb 100644 --- a/app/models/vim_performance_state.rb +++ b/app/models/vim_performance_state.rb @@ -5,8 +5,8 @@ class VimPerformanceState < ApplicationRecord belongs_to :resource, :polymorphic => true - ASSOCIATIONS = [:vms, :hosts, :ems_clusters, :ext_management_systems, :storages, :container_nodes, :container_groups, - :all_container_groups, :containers] + # we want these even if we don't roll them up + ASSOCIATIONS = Metric::Rollup::ASSOC_KEYS # Define accessors for state_data information [ @@ -187,7 +187,7 @@ def capture_total(field) def capture_assoc_ids result = {} - ASSOCIATIONS.each do |assoc| + (ASSOCIATIONS + resource.class::PERF_ROLLUP_CHILDREN).uniq.each do |assoc| method = if assoc == :vms if resource.kind_of?(EmsCluster) :all_vms_and_templates