Update alerta_prometheus.py (#380)
Resolves issue 'USE_AM_EXTERNALURL_FOR_SILENCES' is not defined : https://github.com/alerta/alerta-contrib/issues/379
This commit is contained in:
parent
69d271ef9f
commit
64e013029d
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ class AlertmanagerSilence(PluginBase):
|
|||
|
||||
# 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)
|
||||
|
|
Loading…
Add table
Reference in a new issue