I am using a Log Match Condition to trigger a GCP alert policy which contains a string match for the text in my firebase function log, e.g.
textPayload =~ "^My Trigger: (.*)$"
This is working a treat, but I really want to trigger different incidents for different matches within the regex group. For example, "My Trigger: ABC"
should be a different incident to "My Trigger: XYZ"
.
Is there a way to achieve this with GCP alert policies?
And as a bonus question!... I'd love to include the textPayload (or even better the regex match) in the alert documentation but can not see a way to do that. I also have more structured data available in the JSON payload in the logging, but am not sure if it is possible to access that either. Maybe I need to make a metric based on this structured data?
Thank you :)