You can monitor the health, capacity, and performance of databases by using metrics , alarms , and notifications.
This topic describes the metrics emitted by the OCI Database with PostgreSQL service in the oci_postgresql metric namespace.
Resources: OCI_OPTIMIZED_STORAGE.
Tip
You can enable logging for OCI Database with PostgreSQL resources. For more information, see Logging Overview.
Overview
The OCI Database with PostgreSQL service metrics help you measure the performance and health of a database. You can use metrics data to diagnose and troubleshoot issues.
To view a default set of metrics charts in the Console, navigate to the database that you're interested in, and then click Metrics. You also can use the Monitoring service to create custom queries.
Prerequisites 🔗
IAM policies: To monitor resources, you must be given the required type of access in a policy (IAM) written by an administrator. Policies are required for using the Console or the REST API with an SDK, CLI, or other tool. The policy must give you access to the monitoring services and the resources being monitored. When you try to perform an action, you might get a message that you don't have permission or are unauthorized. Confirm with your administrator the type of access you've been granted and which compartment you should work in. For more information on user authorizations for monitoring, see the Authentication and Authorization section for the related service: Monitoring or Notifications.
The metrics listed on this page are automatically available for any resources you create. You don't need to enable monitoring on the resource to get these metrics.
Available Metrics 🔗
OCI Database with PostgreSQL metrics include the following dimensions:
resourceType: The type of resource for which the metrics apply
resourceName: The name of the resource for which the metrics apply
resourceId: The OCID of the resource for which the metric applies
dbInstanceRole: Whether the node is the primary node or a read replica node
dbInstanceId: The ID of the node for which the metrics apply
Metric
Metric Display Name
Unit
Description
Dimensions
BufferCacheHitRatio
Buffer Cache Hit Ratio
percentage
The percentage of pages found in the buffer cache without reading from disk.
resourceType
resourceName
resourceId
dbInstanceRole
dbInstanceId
Connections
DB Connections
count
The number of database connections.
resourceType
resourceName
resourceId
dbInstanceRole
dbInstanceId
CpuUtilization
CPU Utilization
percentage
The CPU utilization expressed as a percentage. The utilization percentage is reported with respect to the number of CPUs the database is allowed to use, which is two times the number of OCPUs.
resourceType
resourceName
resourceId
dbInstanceRole
dbInstanceId
Deadlocks
Deadlocks
count
The number of locks on a database row where two or more transactions are waiting for another transaction to give up a locked row.
resourceType
resourceName
resourceId
dbInstanceRole
dbInstanceId
WriteIops
Write IOPS
count
The number of writes per second.
resourceType
resourceName
resourceId
dbInstanceRole
dbInstanceId
ReadIops
Read IOPS
count
The number of reads per second.
resourceType
resourceName
resourceId
dbInstanceRole
dbInstanceId
WriteLatency
Write Latency
ms
Write latency in milliseconds.
resourceType
resourceName
resourceId
dbInstanceRole
dbInstanceId
ReadLatency
Read Latency
ms
Read latency in milliseconds.
resourceType
resourceName
resourceId
dbInstanceRole
dbInstanceId
WriteThroughput
Write Kilobytes
KB
Writes in kilobytes per second.
resourceType
resourceName
resourceId
dbInstanceRole
dbInstanceId
ReadThroughput
Read Kilobytes
KB
Reads in kilobytes per second.
resourceType
resourceName
resourceId
dbInstanceRole
dbInstanceId
MemoryUtilization
Memory Utilization
percentage
The percentage of total RAM that's in use.
resourceType
resourceName
resourceId
dbInstanceRole
dbInstanceId
UsedStorage
Used Storage
GB
The amount of storage used, expressed in GB.
resourceType
resourceName
resourceId
dbInstanceRole
dbInstanceId
View Default Metric Charts 🔗
Open the navigation menu and click Databases. Under PostgreSQL, click Databases.
Click the name of the database for which you want to see metrics.
On the DBSystem details page, under Resources, click Metrics.
The Metrics page displays a default set of charts for the current database. The metrics shown originate from the primary node's read/write endpoint.
For more information about monitoring metrics and using alarms, see Monitoring. For information about notifications for alarms, see Notifications.