Skip to content

Commit

Permalink
Don't queue metrics capture if metrics unsupported
Browse files Browse the repository at this point in the history
If metrics capture is unsupported by the provider then do not queue
perf_capture for targets on that EMS.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1610449
  • Loading branch information
agrare committed Aug 8, 2018
1 parent 8a79376 commit 377d868
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/ext_management_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ def supports_authentication?(authtype)
authtype.to_s == "default"
end

def supports_metrics?
true
end

# UI method for determining which icon to show for a particular EMS
def image_name
emstype.downcase
Expand Down
2 changes: 2 additions & 0 deletions app/models/metric/targets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def self.capture_container_targets(emses, _options)

targets = []
emses.each do |ems|
next unless ems.supports_metrics?

targets += with_archived(ems.all_container_nodes)
targets += with_archived(ems.all_container_groups)
targets += with_archived(ems.all_containers)
Expand Down

0 comments on commit 377d868

Please sign in to comment.