Yelp / elastalert

Easy & Flexible Alerting With ElasticSearch
https://elastalert.readthedocs.org
Apache License 2.0
8k stars 1.74k forks source link

googleChatPluginConnectivityError #3053

Open Jayaram059 opened 3 years ago

Jayaram059 commented 3 years ago

"_index": "elastalert_status_error", Error while running alert googlechat: Error posting to google chat: 400 Client Error: Bad Request for url: https://chat.googleapis.com/v1/spaces/AAAAPQHUtOI/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=lEdbtivX1OuO-0etmMgBYzxP_2uY%20jr6r9AC2mLd-byY%3D",

Reason: When we configure webapp in Google Chat group by default it will be pre-fixed with %3D hence elastalert is not able to send messages to this channel

This must be handled at elasta side is my thought.

Jayaram059 commented 3 years ago

I think you should post'https://chat.googleapis.com/v1/spaces/...%3D', but if you post all of them, other people will send a message to your google chat. .. If you don't mind, I won't say anything more

Agreed, that's why I deleted the chat group before I post here for safeside !!! What I am trying to say here is, email alert is working perfectly, when it comes to GoogleChat, when we we create any webhook and copy the webhook URL chat is by default appending %3D and if we mention this in our config file Elastalert can't send any matches to given chat group as it can't connect, if you remove last 3 characters from URL it works.

So thought this would be either helpful to anyone uses it or if possible elastalert team can fix it !!!