cloudsql_monitoring#

Alerts for CloudSQL instances. These should probably be in the idf_deploy repo because we’re already declaring the instances and parameters there. But we decided to split our monitoring into a separate repo, so we re-declare them all here, because it seems easier to do that than to replicate the alerting channel and routing logic in the idf_deploy repo.

Available metrics are in the Google Cloud CloudSQL docs.

Inputs#

Name

Description

Type

Default

Required

connections_threshold_percent

Notify when the percentage of existing connections to max_connections is greater than this.

number

70

no

cpu_threshold_percent

Notify when CPU usage is above this percentage, from 0 to 100.

number

80

no

disk_threshold_percent

Notify when disk usage is above this percentage, from 0 to 100.

number

80

no

google_project

Google Cloud project id. We need this because it is used in the database instance id that we need to query metrics for.

string

n/a

yes

instance_name

The name of the CloudSQL database instance to monitor.

string

n/a

yes

max_connections

The value of the max_connections Postgres parameter. This may be set explicitly, or it may be defaulted by Google based on the amount of memory of the instance. The defaults are listed in the Google Cloud docs (search the page for “max_connections”). The only way to know for sure is to query the db with SHOW max_connections;

number

n/a

yes

memory_threshold_percent

Notify when memory usage is above this percentage, from 0 to 100.

number

70

no

notification_channel_id

The ID of a Slack Google Cloud Monitoring notification channel to send notifications to.

string

n/a

yes

This page was last modified on .