-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
Customizing Apache Superset to Send Alerts via Webhook (REST API) Instead of Email/Slack #30304
Comments
Can you add more details regarding what alert data/details you're looking to send to the webhook? I would look into the following files to get started: |
Hi everyone, I'm currently working on integrating custom webhook notifications for alerts in Apache Superset. My goal is to send alert messages to a POST REST API instead of using traditional notification methods like email or Slack. What I’ve Implemented: Custom Webhook Notification Method: I've created a custom script (webhook.py) to handle the notifications.
Alert Configuration: I’ve set up alerts that should trigger based on certain conditions in my database. Basically, I created this alert from the REST API - http://0.0.0.0:8088/api/v1/report/ (for creating alerts) with the payload -
Database Testing: I’ve mocked the data by adding records to the database and verified that the alerts should be triggered when the conditions are met. Issues Encountered: superset/reports/models.py
superset/reports/notifications/Base.py
Superset_Config.py
Celery and Redis are running correctly - Request for Help: I would appreciate any insights or suggestions on troubleshooting this issue. |
big vote for this feature |
Hello Community, Any update on the above request. |
Your ideas are great. The feature I'm developing happens to include what you mentioned. Webhook is quite good because the integration of enterprise-level instant messaging is too scattered. Function: At the same time, the alarm data source will be passed to the finely tuned large model, the analysis report will be generated and pushed synchronously after adding hyperlinks. The expected method is to use the salted symmetric SHA3 algorithm to encrypt private data and ensure data security. Currently, this feature is still in the development stage. If it is completed, I will contribute. Version↓ : |
One extremely useful feature would be if, instead of constructing the webhook payload directly in python, you allowed users to provide a Jinja template. Then you could feed the alert results into that template. That would be much more versatile than having people maintain custom python libraries. Also, maybe tap into the existing alerts UI instead of making your own? |
Hello Superset Community,
I’m working on a project where we need to send alerts to a webhook (REST API) with alert details, rather than using the default email or Slack notification channels provided by Superset. I’m looking to customize Superset to achieve this functionality.
Requirements
Custom Notification Channel: Implement a webhook (REST API) to receive alerts.
Alert Details: The webhook should receive detailed information about the alert.
Customization Steps
I understand that to implement this, modifications will likely be needed in the following areas:
Notification Handler:
Implement a custom notification handler to send alerts to the webhook.
The class might need to extend BaseNotifier from superset.tasks.notifications.base.
Configuration Files:
Update superset_config.py to register the new notification handler.
Ensure the new webhook handler is included in the notification listeners.
Alerting Component:
Modify or extend alert creation and management to support webhook notifications.
Questions
Files to Modify: What specific files and classes should be modified to integrate a custom webhook for alerts?
Implementation Guidance: Could you provide guidance on implementing a custom notifier for webhooks? Any code snippets or references would be greatly appreciated.
Testing: What’s the best way to test this integration to ensure that alerts are properly sent to the webhook?
Any assistance or pointers to relevant documentation would be greatly appreciated!
The text was updated successfully, but these errors were encountered: