OCI Database with PostgreSQL Metrics
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.
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 applyresourceName
: The name of the resource for which the metrics applyresourceId
: The OCID of the resource for which the metric appliesdbInstanceRole
: Whether the node is the primary node or a read replica nodedbInstanceId
: 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. |
|
Connections |
DB Connections | count | The number of database connections. |
|
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. |
|
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. |
|
WriteIops |
Write IOPS | count | The number of writes per second. |
|
ReadIops |
Read IOPS | count | The number of reads per second. |
|
WriteLatency |
Write Latency | ms | Write latency in milliseconds. |
|
ReadLatency |
Read Latency | ms | Read latency in milliseconds. |
|
WriteThroughput |
Write Kilobytes | KB | Writes in kilobytes per second. |
|
ReadThroughput |
Read Kilobytes | KB | Reads in kilobytes per second. |
|
MemoryUtilization |
Memory Utilization | percentage | The percentage of total RAM that's in use. |
|
UsedStorage |
Used Storage | GB | The amount of storage used, expressed in GB. |
|
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.
Using the API
Use the following APIs for monitoring:
- Monitoring API for metrics and alarms
- Notifications API for notifications (used with alarms)
For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see SDKs and the CLI.