Skip to content

Commit

Permalink
Opsgenie prod only (#195)
Browse files Browse the repository at this point in the history
* only page teams for ellation account services

* remove account names from code
  • Loading branch information
dlutsch authored Aug 10, 2020
1 parent dcca87d commit 1602d1b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions efopen/newrelic_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,12 @@ def update_application_services_policies(self):
self.replace_symbols_in_condition(policy)

# Configure Opsgenie notifications for services running in the production account
if self.context.env in ["prod", "global.ellation", "mgmt.ellation"]:
self.add_policy_to_opsgenie_channel(policy, opsgenie_team)
try:
prod_account = EFConfig.ENV_ACCOUNT_MAP['prod']
if self.context.env in ["prod", "global.{}".format(prod_account), "mgmt.{}".format(prod_account)]:
self.add_policy_to_opsgenie_channel(policy, opsgenie_team)
except KeyError:
pass

# Infra alert conditions
policy = self.override_infra_alert_condition_values(policy, service_alert_overrides)
Expand Down

0 comments on commit 1602d1b

Please sign in to comment.