OCI Monitoring makes it easy to export metrics

April 13, 2021 | 5 minute read
Kay Singh
Principal Product Manager
Text Size 100%:

It’s no secret that monitoring is a key part of any organization’s operations. Cloud monitoring and observability have become table stakes for running today’s world-class applications, whether they reside in public clouds or private data centers. Without it, critical changes in availability, quality, and performance can go undetected until it’s too late. Monitoring allows you to identify potential risks before they cause downtime or lost revenue.

Oracle Cloud Infrastructure (OCI) Monitoring service solves this problem by providing full-stack observability for your apps and infrastructure deployed in OCI on a single pane of glass. OCI Monitoring enables DevOps, IT, and SRE teams to quickly gain insights into their entire application stack and take preventive action before an issue can affect user experience or bottom line.

Export metrics

One of the top questions customers ask us is, “How do I export the metrics out of OCI Monitoring for analysis in my own system?” To make this process easy, we’re publishing a serverless Functions-based solution to enable metrics to be exported to an Object Storage bucket in the following steps:

  1. Monitoring provides the SummarizeMetricsData API that returns aggregated metric data for the specified Monitoring query.

  2. You can call this API using one of the OCI SDKs or the OCI CLI.

  3. To make it easy to get started, we’ve built an OCI Functions-based solution that can make it easy to export metric data by providing a few input parameters, such as time span to export, and metric namespace. You can find the detailed solution in this GitHub repo.

The solution is published at this GitHub repo. From the CLI, run the following command:

echo ’{"compartmentId":"<your ocid1.compartment.oc1..aaaaxxxxxxx>"}’ | fn invoke metrics-export-app oci-monitoring-metric-export

You have several optional parameters to customize the query and time range. With compartmentId, use any combination of other parameters. For example, to select a specific namespace and custom query, use the following format:

echo ’{"compartmentId":"ocid1.compartment.oc1..aaaaxxxxxxx", "namespace":"<your namespace>", "query":"<your query>"}’ | fn invoke metrics-export-app oci-monitoring-metric-export

The following graphic displays the overall architecture for this solution:

OCI Monitoring features

Other than making it easy to export metrics, OCI Monitoring provides the following features to enable full-stack observability for your applications on OCI.

Out-of-the-box monitoring

Without any work required from you, all OCI services send metrics to the Monitoring service when you create a resource with that service. You can collect many types of metrics for different use cases. Infrastructure metrics like CPU, memory, and disk usage help you monitor your servers and virtual machines. Service-level metrics, such as the latency, network connection errors, and response time, let you review your applications’ performance. You can use usage metrics like the number of requests or events that hit specific endpoints to verify SLAs for your applications and services. For the full list of OCI service metrics, see the documentation.

Prebuilt dashboards by service owners

Every service that integrates with OCI Monitoring provides a prebuilt dashboard of the service’s most important metrics. This space is usually the first place to view the important metrics for a service. To view these default dashboards, open the navigation menu in the Console, and under Solutions and Platform, go to Monitoring and click Service Metrics.

The following graphics show some example dashboards.


A screenshot of example Compute metrics in the Console.

Object Storage

A screenshot of example Object Storage metrics in the Console.

Explore the sea of metrics

When you want to take it up a notch and plot a specific metric, the Metric Explorer is the perfect destination. In the Console, under Solutions and Platform, go to Monitoring and click Metric Explorer. With a few selections of the metric namespace, metric, and dimension, you can see the time series data on a chart in no time!

A screenshot of the Metrics Explorer in the Console.

Ingest your custom metrics

Sometimes, the service metrics aren’t sufficient to get a complete picture of your application. For these scenarios, OCI Monitoring provides a PostMetricData API that gives you complete control over the metrics that you can send to the OCI Monitoring platform. You can access your published custom metrics the same way you access any other metrics stored by the Monitoring service. View charts from queries using the Console, query metrics using the CLI or API, and set up alarms using the Console, CLI, or API. For more details, see the documentation.

OCI instances also have a monitoring agent installed, which sends metrics such as CPU, Disk, and network utilization to the OCI Monitoring service. For more information about this agent, see the documentation.

Create alarms to get notified when things go wrong

The Alarms feature of the Monitoring service works with the Notifications service to notify you when metrics meet specified triggers. When triggered, an alarm sends an alarm message to the configured topic (in the Notifications service), which then sends the message on to all the topic’s subscriptions. When configured, repeat notifications remind you of a continued firing state at the configured repeat interval. You can also configure suppression intervals for alarms when you don’t want to be notified.

Integration with the monitoring ecosystem

OCI Monitoring integrates with OCI Notifications service to deliver alarm notifications to messaging channels, such as Email, Slack, and Pager Duty. With the recently announced OCI Notifications SMS capability, you can also send alarm notifications to 35 countries with more along the way. With the messaging channels, you can also deliver messages to any HTTPS endpoint and write code to take action using OCI Functions.

A graphic depicting the integration between OCI Monitoring service and messaging channels.

We’ve published some example solutions that help integrate OCI Monitoring with third-party systems, such as ServiceNow and Jira.

Apply existing Grafana investments

OCI Monitoring also allows you to use your existing Grafana dashboards and monitor your OCI resources. All you need to do to get started is install the official OCI Monitoring Grafana plugin.

A screenshot of the Grafana dashboard running the official OCI Monitoring plugin.

Getting started

We want you to experience these new features and all the enterprise-grade capabilities that OCI offers. It’s easy to try them with our US$300 free credits. OCI Monitoring also offers a generous free tier compared to our competitors. Beyond the free tier, Oracle Cloud Infrastructure Monitoring provides a simple, competitive pricing model based on the number of data points sent as custom metrics and the number of data points used for analysis.

For more information, see the Oracle Cloud Infrastructure Resource Monitoring service essentials and the Oracle Cloud Infrastructure Monitoring documentation.

Kay Singh

Principal Product Manager

Kay Singh is the Product Manager for Service Connector Hub (SCH). In the past, he's worked on the OCI Notifications, OCI Monitoring and OCI Dashboard services.

Previous Post

Announcing support for external Oracle databases and hosts in Oracle Cloud Infrastructure Operations Insights service

Ashish Agrawal | 3 min read

Next Post

Announcing distributed tracing for Oracle Functions

Sachin Pikle | 3 min read