Note: To view instance monitoring information, you must have the required
permissions. If you are using only Cloud SQL roles (as opposed to the
legacy roles such as Editor or Viewer), you must also add the legacy Viewer role
to enable the display of monitoring information. Learn more.

Viewing instance summary information

You can view summary information about your Google Cloud SQL instances in the
Google Cloud Platform Console, or by using the gcloud command-line tool,
or the API.

Console

Go to the Cloud SQL Instances page in the Google Cloud Platform Console.

If the size of your binary logs are causing an issue for
your instance, you can increase your storage size, but the binary log
size increase in binary might be temporary. You can disable and
then reenable binary logging, which deletes binary logs. Note, however,
that decreasing the storage used does not shrink the size of the storage
provisioned for the instance.

A newly created database uses about 100 MB for system tables and files.

CPU usage

You can use this metric to monitor whether your instance has
sufficient CPU for your application's needs. If this value is running too
high, you can increase the size of your machine type to give your instance
more CPU capability.

Memory usage

The amount of memory being used by your instance.

Read/write operations

The Number of Reads metric is the number of read operations served from disk that do
not come from cache. You can use this metric to help you understand whether
your instance is correctly sized for your environment.
If needed, you can move to a larger machine type to serve more
requests from cache and reduce latency.

The Number of Writes metric is the number of write operations to disk. Write
activity is generated even if your application is not active,
because Cloud SQL instances write to a system table approximately every second
(except for replicas).

Active connections

Number of open connections to the Cloud SQL instance.

Ingress/Egress bytes (bytes/sec)

The amount of network traffic coming into or leaving the instance.

Transactions/sec

The number of transactions that have been committed or rolled back on the
instance. These values correspond to the xact_commit and
xact_rollbackstatistics.

Figure 1 points out the different parts of a usage chart.

Figure 1: Example instance usage data

where

Callout 1: The metric data displayed in the chart.

Callout 2: The time range for which to view the metric data.

Callout 3: The value of the metric at the cursor.

Callout 4: The data cursor. Use the cursor to find the
value of a metric at a specific time.

Viewing instance usage data using Stackdriver

If you need a metric not shown in the Instance details page, or more flexibility
with your data format or display options, you can use Stackdriver to get
information about your Cloud SQL instance.

Note: The operations log does not include operations performed using
external management tools, such as the psql client. Only user management and
password change operations performed using the Google Cloud Platform Console, gcloud
command-line tool, or the Cloud SQL API appear in the operations log.

Viewing log files

You can use the Logs Viewer in the Google Cloud Platform Console to view error and log files.