Integrating Third-Party Monitoring Platform with Cloud Build Pipeline | SEO Tips

Integrating Third-Party Monitoring Platform

Question

You use a multiple step Cloud Build pipeline to build and deploy your application to Google Kubernetes Engine (GKE)

You want to integrate with a third-party monitoring platform by performing a HTTP POST of the build information to a webhook.

You want to minimize the development effort.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

D.

To minimize development effort and integrate with a third-party monitoring platform, we can use Stackdriver Logging to create a logs-based metric and then create an alert with a webhook notification type. This approach is described in option C.

Option A of adding logic to each Cloud Build step to HTTP POST the build information to a webhook would require considerable development effort, as each step would need to be modified to include this logic.

Option B of adding a new step at the end of the pipeline in Cloud Build to HTTP POST the build information to a webhook is less work than option A but still requires additional development effort to add the new step.

Option D of creating a Cloud Pub/Sub push subscription to the Cloud Build cloud-builds PubSub topic to HTTP POST the build information to a webhook would also require additional development effort to set up and manage the subscription.

Therefore, option C of using Stackdriver Logging to create a logs-based metric from the Cloud Build logs and creating an Alert with a Webhook notification type is the best approach to minimize development effort and integrate with a third-party monitoring platform.

To implement this approach, we can follow the below steps:

  1. Create a logs-based metric from the Cloud Build logs that captures the build information we want to send to the third-party monitoring platform.

  2. Create an Alert in Stackdriver Monitoring that uses the logs-based metric as a condition and set the notification type to Webhook.

  3. Configure the webhook endpoint in the third-party monitoring platform to receive the HTTP POST from Stackdriver Monitoring.

  4. Deploy the application to GKE using the multiple step Cloud Build pipeline.

  5. When the build completes, Stackdriver Monitoring evaluates the logs-based metric against the condition in the Alert and triggers the webhook notification to the third-party monitoring platform.

Overall, using Stackdriver Logging and Monitoring to send build information to a third-party monitoring platform via a webhook notification is a simple and effective approach that minimizes development effort.