New Relic alerts not working with google chat

Some news ? In one month we need to adopt google chat.

Hey @sys-admin - We don’t have an update right now - The issue here is the format of JSON that google chat expects does not match that which our Webhook channel sends.
I’ll get your +1 added to the feature request here.

Hello, we are also moving to Hangout Chat next month, let me know if you need any help from google to fix this.

Hey @jeetendra.po - Thanks for your additional +1 here, I’ll get that added and passed over to the Alerts team.

Hello, we are also moving to Hangout Chat next month, there is update on this ?

Hey @sys-admin - No update right now, your +1 is added though.

Hello, there is any news about this?
Thanks

Hi @mdiasmolina, there is a Feature Idea on this here, if you could vote on it and add your use-case that would be great, as the more support these features get the better :slight_smile:

Hello, we’ve change to Google Chat but the New Relic alert notifications are on the old platform, there is update on this?

Hey @Vinicius.Peres - no update right now, but we can definitely get your +1 added :slight_smile: Feel free to vote over on the Feature Idea here:

Hello All, any update on this? :slight_smile:

Hey @tribhuban.jha1 -

I don’t know of any update on this just yet - but we’ll get your +1 added in for you.

don’t see gChat upon the list of notification channels yet, and the webhook payload doesn’t match what they expect …
so, any update on this?

Hi @umomany, this is still being worked on at the moment. There is no update at the moment but as soon as there is, we will let the community know as soon as possible.

2 Likes

I manage to make it work after researching and talking to a friend, Thanks Felipe Vasconsellos:

  • Replace “%3D” to “=” at the end of the webhook URL;
  • add a payload with all the variables within the “text” jason in a sigle line.
    e.g:
    {“text”:“account $ACCOUNT_ID \n account_name $ACCOUNT_NAME \n closed_violations_count_critical $CLOSED_VIOLATIONS_COUNT_CRITICAL \n closed_violations_count_warning $CLOSED_VIOLATIONS_COUNT_WARNING \n condition_description $DESCRIPTION \n condition_family_id $CONDITION_FAMILY_ID \n condition_name $CONDITION_NAME \n current_state $EVENT_STATE \n details $EVENT_DETAILS \n duration $DURATION \n event_type $EVENT_TYPE \n incident_acknowledge_url $INCIDENT_ACKNOWLEDGE_URL \n incident_id $INCIDENT_ID \n incident_url $INCIDENT_URL \n metadata $METADATA \n open_violations_count_critical $OPEN_VIOLATIONS_COUNT_CRITICAL \n open_violations_count_warning $OPEN_VIOLATIONS_COUNT_WARNING \n owner $EVENT_OWNER \n policy_name $POLICY_NAME \n policy_url $POLICY_URL \n runbook_url $RUNBOOK_URL \n severity $SEVERITY \n targets $TARGETS \n timestamp $TIMESTAMP \n timestamp_utc_string $TIMESTAMP_UTC_STRING \n violation_callback_url $VIOLATION_CALLBACK_URL \n violation_chart_url $VIOLATION_CHART_URL \n”}
  • Format it later.

I’d love to see your text formatting on this so I can use it :stuck_out_tongue:

Cheers :slight_smile:

6 Likes

Thanks so much for sharing that @marcelo1leon!

yeah it’s works thanks!

Thanks a ton @marcelo1leon . It works perfect now

This is the formar I’m using… I removed the chart because if the URL is not provided by NewRelic the card will be empty in Google Chat.

{
"cards": [
    {
        "header": {
            "title": "New Relic Alert",
            "subtitle": "$POLICY_NAME",
            "imageUrl": "https://a.slack-edge.com/ae7f/plugins/new_relic/assets/service_512.png"
        },
        "sections": [
            {
                "widgets": [
                    {
                        "keyValue": {
                            "topLabel": "State",
                            "content": "$EVENT_STATE"
                        }
                    },
                    {
                        "keyValue": {
                            "topLabel": "When",
                            "content": "$TIMESTAMP_UTC_STRING"
                        }
                    },
                    {
                        "keyValue": {
                            "topLabel": "Event details",
                            "content": "$EVENT_DETAILS"
                        }
                    }
                ]
            },
            {
                "widgets": [
                    {
                        "buttons": [
                            {
                                "textButton": {
                                    "text": "See alert in NewRelic",
                                    "onClick": {
                                        "openLink": {
                                            "url": "$INCIDENT_URL"
                                        }
                                    }
                                }
                            }
                        ]
                    },
                    {
                        "buttons": [
                            {
                                "textButton": {
                                    "text": "Acknowledge alert",
                                    "onClick": {
                                        "openLink": {
                                            "url": "$INCIDENT_ACKNOWLEDGE_URL"
                                        }
                                    }
                                }
                            }
                        ]
                    }
                ]
            }
        ]
    }
]
}
3 Likes

This is how it looks in Google Chat.

Screenshot 2021-09-10 at 10.59.42

3 Likes