Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while running plugin 'alerta_slack' #396

Open
qx10 opened this issue Jul 7, 2023 · 0 comments
Open

Error while running plugin 'alerta_slack' #396

qx10 opened this issue Jul 7, 2023 · 0 comments

Comments

@qx10
Copy link

qx10 commented Jul 7, 2023

Hello! I have Alerta installation in Kubernetes with alerts from several sources and it works good. But if I try to enable slack plugin I see error in pod logs (see below).
Alerta installed by Helm chart with image alerta/alerta-web:9.0.0.
Enabled plugins in config: PLUGINS = ['blackout','heartbeat','slack']
Also I use following SLACK params - SLACK_WEBHOOK_URL and SLACK_CHANNEL - to try receive anything from Alerta.

How I can resolve this problem? I need to add additional params or it's probably a bug?

2023-07-07 05:04:49,283 alerta.app[45]: [ERROR] Error while running post-receive plugin 'alerta_slack': 'NoneType' object has no attribute 'repeat' request_id=f233a163f18674f27fe26520a739b6c4 ip=10.244.229.44
Traceback (most recent call last):
  File "/venv/lib/python3.8/site-packages/alerta/utils/api.py", line 74, in process_alert
    updated = plugin.post_receive(alert, config=wanted_config)
  File "/venv/lib/python3.8/site-packages/alerta_slack.py", line 194, in post_receive
    if alert.repeat:
AttributeError: 'NoneType' object has no attribute 'repeat'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/venv/lib/python3.8/site-packages/alerta/webhooks/custom.py", line 55, in custom
    alert = process_alert(alert)
  File "/venv/lib/python3.8/site-packages/alerta/utils/api.py", line 81, in process_alert
    raise ApiError(f"Error while running post-receive plugin '{plugin.name}': {str(e)}")
alerta.exceptions.ApiError: Error while running post-receive plugin 'alerta_slack': 'NoneType' object has no attribute 'repeat'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/venv/lib/python3.8/site-packages/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
  File "/venv/lib/python3.8/site-packages/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/venv/lib/python3.8/site-packages/flask_cors/decorator.py", line 128, in wrapped_function
    resp = make_response(f(*args, **kwargs))
  File "/venv/lib/python3.8/site-packages/alerta/auth/decorators.py", line 53, in wrapped
    return f(*args, **kwargs)
  File "/venv/lib/python3.8/site-packages/alerta/webhooks/custom.py", line 73, in custom
    raise ApiError(str(e), 500)
alerta.exceptions.ApiError: Error while running post-receive plugin 'alerta_slack': 'NoneType' object has no attribute 'repeat'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant