How do i pass information from a Google Cloud Monitoring (stackdriver) Alert to OpsGenie?
Asked by Scott Smith:

Currently I only get a small amount of information from Google Cloud Monitoring (GCM) when I create the OpsGenie alert. This is primarily the truncated message and a link to the original GCM incident. This is all ending up in a slack channel but that has very little impact on this question (i believe)

I would very much like to be able to see the entire message that gets passed or be able to define custom properties in GCM that get passed through. Here's an example:

The original message that the GCM incident creates

```
OpenCensus/MyCustomMetric for some-google-project Generic Node labels {project_id=some-google-project, location=global, namespace=5554b3550193, node_id=555555550193} with metric labels {metadata=1, valueX=95.0, valueY=100} is above the threshold of 1.000 with a value of 2.000.
```

OpsGenie truncates this to 100 characters and there's no way i can get the meat of the information i need (the labels and the threshold values)

I have custom documentation and user labels in the GCM Alert that doesn't get passed through either.

Can anybody point me at any existing documentation or point me in some direction to get past this issue? Or tell me it's not possible and I'll refocus.

Thank you in advance.


Answers:
author: Nick H
body: Related to [@Shivam Naik](/t5/user/viewprofilepage/user-id/3915058) 's fantastic answer, we recently published a similar Community article on [How to Extract Custom Fields and Data into an Alert](https://community.atlassian.com/t5/Opsgenie-articles/How-to-Extract-Custom-Fields-and-Data-into-an-Alert/ba-p/2133902). Enjoy!!


author: Shivam Naik
body: Hi [@Scott Smith](/t5/user/viewprofilepage/user-id/4191861) ,

Happy to help!

We have documentation here specifically for Stackdriver here <https://support.atlassian.com/opsgenie/docs/integrate-opsgenie-with-stackdriver/>, but in order to tailor your Alerts to display additional information, you will need to make use of the Advanced Settings in the integration to include more fields in the alerts <https://support.atlassian.com/opsgenie/docs/use-advanced-integration-settings/>. Since the Subject is pulling in additional information I would recommend making use of String Processing in the Alert Message field <https://support.atlassian.com/opsgenie/docs/string-processing-methods-in-opsgenie-integrations/> so that you can have it pull in specific text rather than the entire message resulting in truncation.

Please let me know if you have any follow up questions!

comments: author: Scott Smith
body: This is fantastic! Thank you! I had seen and reviewed all those pages independently but your explanation and collection makes it come together well.

Also, to add a little more. The last link in the \`use-advanced-integration-settings\` link points to dynamic field usage. This is what really opened the door for me. Being able to tap into the raw payload was a game changer.

<https://support.atlassian.com/opsgenie/docs/dynamic-fields-in-opsgenie-integrations/>

Thank you so much for the detailed answer.


author: Shivam Naik
body: Hi [@Scott Smith](/t5/user/viewprofilepage/user-id/4191861) ,

No problem, definitely let us know if you have any follow up questions!


Tags: cloud

google