Can we have alert notifications on google hangout?

Hey @tusharbangar37
We do not have a direct integration with Hangouts.

We do have the webhook notification channel; (link here for more info), the webhook is simply a HTTP Post with a JSON document with information on your alerts.

From my searching on Google Hangouts integrations, they can not accept incoming webhooks. However, it may be possible for you to send the webhook to a 3rd party which parses the data and send the alerts onwards using the Google Hangouts API.

I’m going to get a feature request started for you on this, and I’ll add a poll to this post for others to share their interest. Let me know if there is any more I can do to help.

2 Likes

Thanks @RyanVeitch , will go through it. If any help required will let you know.

1 Like

Hi how are you doing?
Could someone make the integration of notifications by webhook with the new google chat?

Hi there @fvannasaeng - You will have to talk to Google about accepting incoming webhooks. If they make that change, then you could use webhooks to send alerts to Google Hangouts. Until then, we’ll all have to wait!

Hi @hross! - They are actually supporting webhooks. Check this link and this for the message formats.
They are actually working. I try to post from postman and works.

Excellent news! So what I am hearing you say is that Google Hangouts now accepts incoming webhooks and you got it to work with postman, but not with New Relic for some reason. Is that right? If you are stuck, we do have a troubleshooting guide that may be a helpful place to start:

Yeap. Is a good news. But i can not make it work. Is the notification from New Relic a POST method? And i mean with the JSON payload.
Also I get a forbidden from Google Chat when i send the test notification.

Any news? This is clearly a problem of the request made by new relic itself

Hi there @aortmann - Although, technically, we don’t support an integration with Google chat specifically, we’ve been doing some testing on our end. Earlier this week one of our support engineers managed to pinpoint what seems to be going wrong. It will take engineering work to get this resolved, so it probably should remain as a feature idea for now.

I encourage you to add your vote to the poll and add any details about how you want to see this implemented. Thank you for your understanding!

This feature would be great! Ideally though, shouldn’t the web hook work universally with all standard requests?

I don’t think this specifically a new feature idea, but more of a fix for the web hook notification channel!

Thanks @grant.fellows - appreciate that insight. We’ll update here when we have any news.

Hi @hross
Do we have any updates about this issue?

Is anyone already solved this or made it work?

Hey @fvannasaeng - There’s no official notification channel to support Hangouts right now. I’ll get your +1 added internally, in the meantime, hopefully someone in the community has made this work.

1 Like

Hi, I’ve made a forwarder of the alerts from slack to gchat some months ago to workaround this problem. This is the gist if anyone want to use it. It’s a free solution and use an actual integration that works great (slack).
Feel free to improve it if you don’t like the card or something, but share it too.

Regards.

3 Likes

That is amazing @aortmann! Thanks so much for sharing this with the community!

1 Like

Hi! I improved the solution, removed slack from it, and make it more easy to implement. Everyone can see it here https://github.com/aortmann/event-manager-webhooks
We’re using this solution in my company for weeks and works like a charm.

Regards.

I got this to work by changing the ‘%3D’ encoded equal sign at the end of the googleapis.com URL to ‘=’ .

The reason is that New Relic is encoding the percent sign, so ‘%3D’ becomes ‘%253D’ in the POST.

1 Like

Ohhhh interesting! Thanks for posting that solution here :smiley:

1 Like

Can you share a screenshot of your webhook setup? I’ve changed the %3D at the end of the Hangouts Chat webhook link and still getting 403 errors. Thanks!

A screenshot doesn’t show much, here is an obfuscated webhook URL, I just had to change the ‘%3D’ to an “=”:
https://chat.googleapis.com/v1/spaces/AASDF1V6QNs/messages?key=ASDFASDFASDFASDASDFjMm-ASDFASDFASDFASDF&token=ASDFASDFASDFASDFASDFASDFASDFASDF_z7oDQ8o7yk=

For APM alerts I used the following JSON:

{
    "cards": [
        {
            "sections": [
                {
                    "widgets": [
                        {
                            "keyValue": {
                                "topLabel": "NEW RELIC $EVENT_TYPE $INCIDENT_ID", 
                                "content": "$SEVERITY - $EVENT_STATE", 
                                "onClick": {
                                    "openLink": {
                                        "url": "$INCIDENT_URL"
                                    }
                                }
                            }
                        }
                    ]
                }, 
                {
                    "widgets": [
                        {
                            "keyValue": {
                                "content": "$CONDITION_NAME", 
                                "topLabel": "Condition"
                            }
                        }, 
                        {
                            "keyValue": {
                                "content": "$POLICY_NAME", 
                                "topLabel": "Policy"
                            }
                        }, 
                        {
                            "keyValue": {
                                "content": "$EVENT_DETAILS", 
                                "topLabel": "Details", 
                                "contentMultiline": "true"
                            }
                        }
                    ]
                }, 
                {
                    "widgets": [
                        {
                            "image": {
                                "imageUrl": "$VIOLATION_CHART_URL"
                            }
                        }
                    ]
                }, 
                {
                    "widgets": [
                        {
                            "buttons": [
                                {
                                    "textButton": {
                                        "text": "View $EVENT_TYPE", 
                                        "onClick": {
                                            "openLink": {
                                                "url": "$INCIDENT_URL"
                                            }
                                        }
                                    }
                                },
                                {
                                    "textButton": {
                                        "text": "Ack $EVENT_TYPE", 
                                        "onClick": {
                                            "openLink": {
                                                "url": "$INCIDENT_ACKNOWLEDGE_URL"
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

I would suggest starting with a simple JSON body like:

{"text": "New Relic Test"}
2 Likes