Skip to content

Commit

Permalink
Merge pull request #16048 from israel-hdez/iss15756
Browse files Browse the repository at this point in the history
Fixing middleware servers alert handling
  • Loading branch information
agrare committed Oct 3, 2017
2 parents 9f21c62 + 68cb336 commit 5e40f7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/models/middleware_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def evaluate_alert(alert_id, event)
s_start = event.full_data.index("id=\"") + 4
s_end = event.full_data.index("\"", s_start + 4) - 1
event_id = event.full_data[s_start..s_end]
if event_id.start_with?("MiQ-#{alert_id}") && event.middleware_server_id == id
if event.middleware_server_id == id && (
event_id.start_with?("MiQ-#{alert_id}") || event_id.start_with?(ext_management_system.miq_id_prefix))
return true
end
false
Expand Down
2 changes: 1 addition & 1 deletion app/models/miq_alert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def evaluate_in_automate(target, inputs = {})
end

def evaluate_internal(target, _inputs = {})
if target.class.name == 'MiddlewareServer'
if target.kind_of?(::MiddlewareServer)
method = "evaluate_middleware"
options = _inputs[:ems_event]
else
Expand Down

0 comments on commit 5e40f7e

Please sign in to comment.