Cloud Monitoring automatically collects and stores information
for your Parallelstore instances. You can use Cloud Monitoring to chart and
monitor a range of metrics.

Cloud Monitoring is automatically enabled for Parallelstore. There's
no charge for the collection of data or to view metrics in the
Google Cloud console. API calls might incur charges; see
[Cloud Monitoring pricing](https://docs.cloud.google.com/monitoring#section-7) for pricing details.

## Required IAM role

You must have the Monitoring Viewer (`roles/monitoring.viewer`) role, or
equivalent permissions, to view metrics in Cloud Monitoring.

Learn how to [grant an IAM role](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access#grant-single-role).

## View metrics

To view Parallelstore metrics in Cloud Monitoring, do the following:

1. Go to the **Metrics Explorer** page in the Google Cloud console.

   [Go to Monitoring: Metrics Explorer](https://console.cloud.google.com/monitoring/metrics-explorer/)
2. Follow the instructions in
   [Create charts with Metrics Explorer](https://docs.cloud.google.com/monitoring/charts/metrics-explorer) to
   select and display your metrics.

## Alert on metrics

To view alerts or create new alerting policies on Parallelstore metrics in
Cloud Monitoring, do the following:

1. Go to the **Alerting** page in the Google Cloud console.

   [Go to Monitoring: Alerting](https://console.cloud.google.com/monitoring/alerting/)
2. Follow the instructions in [Configure alerting policies and notifications](https://docs.cloud.google.com/monitoring/alerts).

## Resource details

Monitored resource name: `parallelstore.googleapis.com/instance`

This resource maps to a single Parallelstore instance.

## Metric details

Data is sampled every 60 seconds. After sampling, data is not visible for up to
180 seconds.

Metric names all begin with
`parallelstore.googleapis.com/instance/`. For example,
`parallelstore.googleapis.com/instance/available_capacity_bytes`.

| Metric | Metric name | Description |
|---|---|---|
| Free usable capacity | `available_capacity_bytes` | The percentage of usable space that is available for use. |
| Utilized usable capacity | `used_capacity_bytes` | The percentage of usable space that is currently being used. |
| Total usable capacity | `total_capacity_bytes` | The total capacity in bytes of this Parallelstore instance. |
| Throughput over time | `transferred_byte_count` | Number of bytes read and number of bytes written over time. |
| IOPs over time | `read_ops_count` | The number of read operations against this instance from any client. |
| IOPs over time | `write_ops_count` | The number of write operations against this instance from any client. |
| Instance failure | `instance_failure` | When an instance is in a permanently failed state, this metric reports `true`; otherwise `false`. |