Creating alerts on specific events
Stackdriver Logging is a service provided by GCP to view and analyze log data from instances and applications. With the log events and in conjunction with Stackdriver Monitoring, we can create alerts on log events and notify the concerned users. Stackdriver Monitoring by itself monitors the application components of our applications hosted in GCP and AWS.
Under Stackdriver Logging and Monitoring, let's suppose the administrator of the organization has requested all users of GCP to create instances only in us-west1
. The admin has not blocked access via IAM policies to other regions; however, they would like to know if any of the users create any instance outside us-west1
. Stackdriver Monitoring provides such a feature to alert the admin in case of a breach of a metric.
Getting ready
The following are the initial setup verification and network creation steps before the recipe can be executed:
- Create or select a GCP project
- Enable billing and enable the default...