Open richardsavage opened 2 years ago
Bug seems to be fixed in https://github.com/alerta/alerta-contrib/pull/380/ but the fix is still unavailable in alerta docker image (currently latest=8.7.0) https://github.com/alerta/docker-alerta/releases. Please release new image version.
Issue Summary When using the prometheus plugin, I get an error, as mentionned in the title: Error while running action plugin 'alerta_prometheus': name 'USE_AM_EXTERNALURL_FOR_SILENCES' is not defined (500)
The problem seem to be this:
the variable set is: ALERTMANAGER_USE_EXTERNALURL_FOR_SILENCES = os.environ.get('ALERTMANAGER_USE_EXTERNALURL_FOR_SILENCES') or app.config.get('ALERTMANAGER_USE_EXTERNALURL_FOR_SILENCES',False)
but the plugin is looking for this:
I tried to change the condition to ALERTMANAGER_USE_EXTERNALURL_FOR_SILENCES and it seem to work fine so far
Environment
OS: LLinux
API version: 8.6.5
Deployment: self-hosted
For self-hosted, WSGI environment: nginx/uwsgi
Database: MongoDB
Server config: Auth enabled? Yes Auth provider? Basic Customer views? No (or provide the
/config
endpoint output)web UI version: 6.7.0
CLI version: na
To Reproduce Steps to reproduce the behavior:
Traceback (most recent call last): File "/opt/alerta/lib64/python3.6/site-packages/flask/app.py", line 1516, in full_dispatch_request rv = self.dispatch_request() File "/opt/alerta/lib64/python3.6/site-packages/flask/app.py", line 1502, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(req.view_args) File "/opt/alerta/lib64/python3.6/site-packages/flask_cors/decorator.py", line 128, in wrapped_function resp = make_response(f(*args, *kwargs)) File "/opt/alerta/lib64/python3.6/site-packages/alerta/auth/decorators.py", line 90, in wrapped return f(args, kwargs) File "/opt/alerta/lib64/python3.6/site-packages/alerta/models/metrics.py", line 258, in wrapped response = f(*args, *kwargs) File "/opt/alerta/lib64/python3.6/site-packages/alerta/utils/response.py", line 18, in decorated return func(args, **kwargs) File "/opt/alerta/lib64/python3.6/site-packages/alerta/views/alerts.py", line 173, in action_alert raise ApiError(str(e), 500)
Traceback (most recent call last): File "/opt/alerta/lib64/python3.6/site-packages/flask/app.py", line 1516, in full_dispatch_request rv = self.dispatch_request() File "/opt/alerta/lib64/python3.6/site-packages/flask/app.py", line 1502, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(req.view_args) File "/opt/alerta/lib64/python3.6/site-packages/flask_cors/decorator.py", line 128, in wrapped_function resp = make_response(f(*args, *kwargs)) File "/opt/alerta/lib64/python3.6/site-packages/alerta/auth/decorators.py", line 90, in wrapped return f(args, kwargs) File "/opt/alerta/lib64/python3.6/site-packages/alerta/models/metrics.py", line 258, in wrapped response = f(*args, *kwargs) File "/opt/alerta/lib64/python3.6/site-packages/alerta/utils/response.py", line 18, in decorated return func(args, **kwargs) File "/opt/alerta/lib64/python3.6/site-packages/alerta/views/alerts.py", line 173, in action_alert raise ApiError(str(e), 500)
For web app issues, include any web browser JavaScript console errors.
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
NOTE: Please provide as much information about your issue as possible. Failure to provide basic details about your specific environment make it impossible to know if an issue has already been fixed, can delay a response and may result in your issue being closed without a resolution.