opensearch-project / dashboards-notifications

The Notifications plugin provides a central location for all of your notifications from OpenSearch plugins. You can use either OpenSearch Dashboards or the REST API to configure notifications. Dashboards offers a more organized way of selecting a channel type and selecting which OpenSearch plugin sources you want to use.
Apache License 2.0
9 stars 35 forks source link

[BUG] Failing to setup Discord webhook notifications #233

Open igorpaytrack opened 1 month ago

igorpaytrack commented 1 month ago

Describe the bug

I'm trying to setup discord notifications, using custom webhooks and other channel types just doesn't work.

[status_exception] {"event_status_list": [{"config_id":"MHUOBJEBYI2ocp6lYB4a","config_type":"slack","config_name":"temp-Discord SRE","email_recipient_status":[],"delivery_status":{"status_code":"500","status_text":"Failed to send webhook message Failed: {\"_misc\": [\"Expected \\"Content-Type\\" header to be one of {'multipart/form-data', 'application/json', 'application/x-www-form-urlencoded'}.\"]}"}}]}

To Reproduce Steps to reproduce the behavior:

First you need a discord Webhook URL

  1. Go to Menu -> Managament -> Notifications
  2. Click on Create channel
  3. Select channel type = Slack or Custom Webhook and paste the Webhook URL
  4. try to send test message

Expected behavior A clear and concise description of what you expected to happen.

OpenSearch Version v 2.11.0

Dashboards Version Not applicable

Screenshots Slack test: image

Custom webhook test: image

Host/Environment (please complete the following information): AWS Managed Open Search

kavilla commented 1 month ago

@opensearch-project/admin could you please re-direct to notifications dashboards.

EthanZoneCoding commented 1 month ago

I'm also having this issue, I think there needs to be more control of the way the parameters are sent

EthanZoneCoding commented 1 month ago

I figured it out. The test message looks like this: Test message content body for config id <id> But that is not valid JSON. Discord expects a value for the "content" key. In the Create Monitor page, you can put in the full message. If you format it as JSON it works. image image There needs to be a way to put a custom test message in the hook setup

dblock commented 3 weeks ago

Catch All Triage - 1, 2, 3