Revolutionizing Cloud Management: The Power of OCI Ops Insights
In the vast landscape of cloud computing, efficient management is key to unlocking an organization’s full potential. Oracle Cloud Infrastructure (OCI) introduces a game-changer with its Ops Insights (OPSI) service, a cloud-native solution designed to simplify and enhance observability. OPSI is an integral part of the Oracle Cloud Observability and Management platform, offering a comprehensive approach to cloud resource management.
From Data to Actionable Insights: The OPSI Advantage
OPSI excels in gathering and analyzing telemetry data from diverse cloud resources, providing valuable insights for informed decision-making. Its ability to perform data-driven capacity planning and performance management is a game-changer for enterprises. By leveraging OPSI, organizations can reduce capital expenditure and significantly improve application throughput, ensuring optimal resource utilization.
Actionable Insights for Efficient Cloud Management
Building upon its News Reports feature, OPSI introduces Actionable Insights, a powerful tool that helps manage tasks through OCI Functions and custom API endpoints. This innovation allows users to transform insights into immediate actions, making cloud management more efficient and responsive.
Example: Optimizing SQL Performance
Let’s delve into a practical example. OPSI Actionable Insights offers eight capacity and SQL insights, including the ‘Degrading SQL details by database insight.’ This feature automatically identifies and addresses performance issues in SQL queries.
Below is a sample payload from a Degrading SQL insight in DB Insights. All insights include tenant, compartment, and resource details, plus, in this case, the SQL ID needed for SQL Tuning Advisor processing.
{
"sqlInsightsPerformanceDegradationSqlDegradedTable": [
{
"ROWS_PROCESSED_PER_EXECUTION": "0.17",
"DB_TIME_SECS": "3.230",
"IO_WRITE_MB": "0.000",
"CPU_TIME_SECS": "0.803",
"IO_READ_MB": "9.594",
"COMMAND_NAME": "SELECT",
"OPSI_ID": "ocid1.opsidatabaseinsight.oc1..qazxswed7zr6rfvbgt6yhnmjui6asdf4ikmjuy5xdogv5rfvbgtyhnmjuiko",
"SQL_ID": "0t73f1234u7q9",
"AVG_LATENCY_SECS": "0.538400",
"EXECUTIONS": "6",
"DISPLAY_NAME": "db name 01",
"AVG_LATENCY_CHANGE_PCT": "25.53",
"tenantId": "ocid1.tenancy.oc1..tgbnhyujmj4ato2edcvfr7lbh5a3f46wsxcderf7yhnmju7ikmnj6bs2r6gtr",
"compartmentId": "ocid1.compartment.oc1..dhrftgyh2qwertyuiopas7yhnbgtrfvc2ujmnhytg5qazxswedcvfrtgb",
"ocId": "ocid1.autonomousdatabase.oc1.phx.abwsxcderf7d5sncqtlnfak4eynlmedcvfrtgbnsdwwuhjm5iuytrewqasdf"
}
]
}
To act on this insight, we can use an OCI Function in Java (Python and other language SDKs are also available) that will receive the JSON payload. By using the payload information, it will connect to the database and submit the respective SQL_ID to the SQL Tuning Advisor. SQL Tuning Advisor is a feature of the OCI Database Management Service, which must be enabled to tune SQL statements. For more information visit Database Management.
Sample OCI Function
import com.oracle.bmc.Region;
import com.oracle.bmc.auth.ResourcePrincipalAuthenticationDetailsProvider;
import com.oracle.bmc.database.DatabaseClient;
import com.oracle.oci.dpd.dbmgmt.SqlTuning;
import com.oracle.oci.dpd.dbmgmt.SqlTuningClient;
import com.oracle.oci.dpd.dbmgmt.model.SqlTuningTaskCredentialDetails;
import com.oracle.oci.dpd.dbmgmt.model.SqlTuningTaskSecretCredentialDetails;
import com.oracle.oci.dpd.dbmgmt.model.SqlTuningTaskSqlDetail;
import com.oracle.oci.dpd.dbmgmt.model.StartSqlTuningTaskDetails;
import com.oracle.oci.dpd.dbmgmt.requests.StartSqlTuningTaskRequest;
import com.oracle.oci.dpd.dbmgmt.responses.StartSqlTuningTaskResponse;
import java.util.Date;
import java.util.List;
public class ActionableFn {
private DatabaseClient databaseClient = null;
private SqlTuning sqlTuning = null;
final ResourcePrincipalAuthenticationDetailsProvider provider
= ResourcePrincipalAuthenticationDetailsProvider.builder().build();
public ActionableFn() {
try {
sqlTuning = SqlTuningClient.builder()
.region(Region.US_PHOENIX_1)
.build(provider);
} catch (Throwable ex) {
System.out.println("Failed to instantiate SqlTuningClient, " + ex.getMessage());
}
}
public String handleRequest(String input) {
String dbId; // retrive value from json input, ocId in this example
String sqlId; // retrive value from json input, SQL_ID in this example
String userName; // user name to connect
String passwordId; // password secret Id to connect
try {
SqlTuningTaskSecretCredentialDetails secretCredentialDetails = SqlTuningTaskSecretCredentialDetails.builder()
.username(userName)
.role(SqlTuningTaskCredentialDetails.Role.Normal)
.passwordSecretId(passwordId)
.build();
StartSqlTuningTaskResponse res = sqlTuning.startSqlTuningTask(StartSqlTuningTaskRequest.builder()
.managedDatabaseId(dbId)
.startSqlTuningTaskDetails(StartSqlTuningTaskDetails.builder()
.totalTimeLimitInMinutes(20)
.scope(StartSqlTuningTaskDetails.Scope.Limited)
.taskName("taskName001")
.credentialDetails(secretCredentialDetails)
.sqlDetails(List.of(SqlTuningTaskSqlDetail.builder()
.sqlId(sqlId)
.build()))
.timeStarted(new Date())
.timeEnded(new Date(new Date().getTime() + 10000))
.build())
.build());
System.out.println("res: " + res);
} catch (Exception e) {
System.out.println("error: " + e.getMessage());
}
return "done";
}
}
This Java function retrieves the necessary information from the JSON payload and initiates the SQL tuning process using the OCI Database Management Service.
The Benefits of OPSI Actionable Insights
OCI Functions and OPSI Actionable Insights helps cloud management become a seamless process. By providing responses to insights, organizations can:
- Address performance issues proactively, ensuring optimal system performance.
- Reduce manual intervention, saving time and resources.
- Leverage data-driven decisions for efficient cloud resource allocation.
- Improve overall cloud operations, leading to a more agile and responsive IT infrastructure.
Take Action Now: Embrace the Future of Cloud Management
Are you ready to transform your cloud observability into actionable intelligence? Explore the power of OCI Ops Insights and discover how Actionable Insights can revolutionize your cloud management strategy. Signup for the service and try OPSI features in demo mode or try it by signing up for Livelabs.
Resources
- Explore Ops Insights
- Hands-on lab: Get Started with Oracle Cloud Infrastructure Ops Insights
- Ops Insights Videos
- Pricing
- Oracle Cloud Observability and Management Platform
- What’s new
OPSI customers can now use the newly launched OCI Generative AI powered Oracle Support Digital Assistant. The Digital Assistant eliminates the need to manually search through the O&M documentation, and provides with quick, accurate answers directly within the OCI console interface. Learn more about it here.
