July 2018
Intermediate to advanced
506 pages
16h 2m
English
Let's create a new alerting policy for our to-do services. Our backend depends on Cloud SQL to store and retrieve to-do items, so we likely want to keep an eye on several indicators around both our Cloud SQL instance, and the todos-backend service's ability to connect to Cloud SQL. One such indicator would be the number of active database connections.
To get started, click Alerting | Create a Policy from within the Stackdriver Monitoring console. From here, click Add Condition and select the Metric Threshold condition type. For this policy, select a resource type of Cloud SQL and apply it to Single, todos-db. For configuration, set the metric to Network Connections. We'll set the condition to above a threshold ...