Table: oci_mysql_db_system_metric_connections - Query OCI MySQL DB System Metrics using SQL
Oracle Cloud Infrastructure (OCI) MySQL Database Service is a fully managed relational database service that enables organizations to deploy cloud-native applications using the world’s most popular open-source database. It is developed, managed, and supported by the MySQL team at Oracle. The service is built on the highly available and secure OCI platform and is fully compatible with on-premises MySQL databases.
Table Usage Guide
The oci_mysql_db_system_metric_connections
table provides insights into connection metrics within OCI MySQL Database Service. As a database administrator, explore connection-specific details through this table, including total connections, successful connections, and rejected connections. Utilize it to uncover information about database connections, such as those with high frequency, the successful and failed connection attempts, and the verification of connection policies.
Examples
Basic info
Explore the performance metrics of your MySQL database system over time. This query helps you assess the minimum, maximum, and average number of connections, along with the total sample count, allowing you to better understand your system's utilization and manage its capacity effectively.
select id, timestamp, minimum, maximum, average, sample_countfrom oci_mysql_db_system_metric_connectionsorder by id, timestamp;
select id, timestamp, minimum, maximum, average, sample_countfrom oci_mysql_db_system_metric_connectionsorder by id, timestamp;
Active connection statistics
Analyze the statistics of active connections to gain insights into the performance and usage patterns of your MySQL database system. This can help you understand peak usage times, manage resources more effectively, and troubleshoot potential issues.
select id, timestamp, round(minimum :: numeric, 2) as min_conn, round(maximum :: numeric, 2) as max_conn, round(average :: numeric, 2) as avg_conn, sample_countfrom oci_mysql_db_system_metric_connectionswhere metric_name = 'ActiveConnections'order by id, timestamp;
select id, timestamp, round(minimum, 2) as min_conn, round(maximum, 2) as max_conn, round(average, 2) as avg_conn, sample_countfrom oci_mysql_db_system_metric_connectionswhere metric_name = 'ActiveConnections'order by id, timestamp;
Current connection statistics
Analyze the current connection statistics from your MySQL database system in Oracle Cloud Infrastructure (OCI) to understand the minimum, maximum, and average connections over a specified period. This can help you manage your database connections more effectively, ensuring optimal performance and resource utilization.
select id, timestamp, round(minimum :: numeric, 2) as min_conn, round(maximum :: numeric, 2) as max_conn, round(average :: numeric, 2) as avg_conn, sample_countfrom oci_mysql_db_system_metric_connectionswhere metric_name = 'CurrentConnections'order by id, timestamp;
select id, timestamp, round(minimum, 2) as min_conn, round(maximum, 2) as max_conn, round(average, 2) as avg_conn, sample_countfrom oci_mysql_db_system_metric_connectionswhere metric_name = 'CurrentConnections'order by id, timestamp;
Query examples
Schema for oci_mysql_db_system_metric_connections
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
average | double precision | The average of the metric values that correspond to the data point. | |
compartment_id | text | The ID of the compartment. | |
id | text | The OCID of the DB System. | |
maximum | double precision | The maximum metric value for the data point. | |
metric_name | text | The name of the metric. | |
minimum | double precision | The minimum metric value for the data point. | |
namespace | text | The metric namespace. | |
region | text | The OCI region in which the resource is located. | |
sample_count | double precision | The number of metric values that contributed to the aggregate value of this data point. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
sum | double precision | The sum of the metric values for the data point. | |
tenant_id | text | =, !=, ~~, ~~*, !~~, !~~* | The OCID of the Tenant in which the resource is located. |
tenant_name | text | The name of the Tenant in which the resource is located. | |
timestamp | timestamp with time zone | The time stamp used for the data point. | |
unit | text | The standard unit for the data point. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- oci
You can pass the configuration to the command with the --config
argument:
steampipe_export_oci --config '<your_config>' oci_mysql_db_system_metric_connections