mattermost-community / mattermost-plugin-aws-SNS

Plugin that receives SNS notification from Alerts created by AWS CloudWatch and sent via AWS SNS
Apache License 2.0
21 stars 22 forks source link

AWSSNS HandleNotification Decode Error on CloudWatch message notification #61

Open zzbmmbzz opened 3 years ago

zzbmmbzz commented 3 years ago

Hi all, Could you please help me how to resolve this error message. I have tried push my message but could not. It show Invalid character ...

{"level":"error","ts":1611738094.420494,"caller":"mlog/sugar.go:23","msg":"AWSSNS HandleNotification Decode Error on CloudWatch message notification","plugin_id":"com.mattermost.aws-sns","err":"invalid character 'e' looking for beginning of value","message":"e33q2saceéd"}

Thanks, Edgar

ffrpr commented 3 years ago

Are you trying to push a message mannually, or this is ocurring with Cloudwatch alerts? Apparently the plugin does not support raw messages, so publishing messages manually will not work because the plugin is expecting a specific format (thats the error you are seent).

If this error is happening with Cloudwatch alarms, you should check if at the subscription option you have the "Support for RAW messages" disabled. If enabled, turn if off.

After doing this changes from the AWS side, I would suggest to: 1- Disable the AWS SNS plugin from mattermost console 2- Remove the plugin folder from your server 3- Install the plugin again from mattermost console.

Asgaros commented 1 year ago

Having the same problem. It would be great if the plugin could support raw messages.

What I am doing is to capture specific messages from EventBridge and then send those to a SNS topic - which should forward those message to our Mattermost instance via the HTTPS-endpoint.