1
votes

currently I am working one some ways to test the capabilities of Google Cloud Stackdriver and how to automate most of it. During my tests, I have to create different policies and checks, but Google Cloud Platform needs a long time until it checks one policy and sends out a notification. I know from my GCP exam, that the supported and best practice way to do test in Stackdriver is by triggering a policy as "dry run".

Unfortunately I can't find any documentation or commands in the Google Cloud SDK on how to call this dry run and test my policies - without waiting 15 minutes for the initial check.

Does anyone know how to do this?

1

1 Answers

0
votes

Update: Thanks to Sudarshan for raising a feature request to Google in here. Feel free to star the request to show interest and follow the progress.


I can't find any "manual trigger" for alerts in the Monitoring API description.

However, you should be able to manually insert the timeseries data on the API, with the data going as far back as you need (specifying the proper intervals) to force the policy to trigger.