We want to put more information into GCP Stackdriver alert notifications like customer contract id (e.g. 47110815), customer environment (prod/dev/test), SLA (24-7-4/24-7-8/nbd), etc. It must be machine readable (currently by alerta monitoring system via webhook) so we would prefer additional key/value fields instead of all information mashed together into documentation/content field.
GCP Stackdriver offers many fields when creating alerting policies: (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alertPolicies)
most interesting is userLabels
:
When creating policies they are shown in stackdriver but it seems like this fields are not included in alert notifications.
Is there any other option than putting all information into the documentation content field? I wanted to use this field for free-text that gives general handling instructions to service desk staff and don't like the idea of parsing machine readable data out of it.
At this time, Stackdriver does not allow you to customize the notifications.
The current way to add more information on Notifications are using the documentation section [1]. You can also use variables in this field to get specific details about the alert [2].