Print Log Entry (textPayload) in Logging Policy Alert sent to Slack etc

Viewed 140

In GCP We have a Policy set to alert when there is a heartbeat failure to one of our "Spokes"

In GCP logging we used a basic log query string match for "Spoke is not ready ... heartbeat for spoke[100]" that matches for everything prior to the spoke number as that is dynamic.

I would like to find a way to be able to print the exact log entry within the "Policy Documentation" field so that it shows the actual spoke that went down (or the full log entry of textPayload, as both contain the spoke ID)

We tried with placing $(textPayload) in the field, but it did not work.

Going through the logging docs, and I can't see to find anything that can be used. Is something like this possible or will it require some more complexity?

0 Answers
Related