Skip to content

Commit

Permalink
Update alerta_prometheus.py (#380)
Browse files Browse the repository at this point in the history
Resolves issue 'USE_AM_EXTERNALURL_FOR_SILENCES' is not defined : #379
  • Loading branch information
NeilOrley authored Jun 22, 2022
1 parent 69d271e commit 64e0130
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/prometheus/alerta_prometheus.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def take_action(self, alert: Alert, action: str, text: str, **kwargs) -> Any:

# if alertmanager is clustered behind a load balancer that mirrors requests we should prefer to create one silence
# rather than many
if USE_AM_EXTERNALURL_FOR_SILENCES:
if ALERTMANAGER_USE_EXTERNALURL_FOR_SILENCES:
base_url = alert.attributes.get('externalUrl', DEFAULT_ALERTMANAGER_API_URL) or ALERTMANAGER_API_URL
else:
base_url = ALERTMANAGER_API_URL or alert.attributes.get('externalUrl', DEFAULT_ALERTMANAGER_API_URL)
Expand Down

0 comments on commit 64e0130

Please sign in to comment.