Brand new in Oracle Cloud Infrastructure (OCI) are Dashboards. This no-cost feature of OCI is easy to find; once you log into your OCI account, on the homepage, you will see a new tab in the top left entitled Dashboard.
Click the link and off you go; create dashboards that show key metrics for all your services in one place. So how can we use this for Cloud Native application and database monitoring? To start, remember that out of the box, the services in OCI can produce logs and/or metrics. We can leverage this built-in framework when creating these dashboards.
When you initially land on the Dashboard page, you can create a new dashboard by clicking the New Dashboard button on the upper right of the page.
Give your dashboard a name, place it in a compartment and add it to a new dashboard group and click the Create button. We now have a blank canvas to start adding widgets.
We can use Dashboards to monitor our entire enterprise application deployment; each individual component getting a widget to show critical metrics. In this example, we are going to monitor an Oracle REST Data Services (ORDS) deployment. The major components in this architecture are the compute instance where ORDS is running, ORDS itself and the cloud database back-end.
Starting with the compute instance, we can create a new widget with the +Add widget button.
Here we are presented with a few options, but we want to select the Monitoring chart.
Once selected, you will see it on your dashboard. Just click Configure to get started with our first widget.
Using the Monitoring Widget Configuration slider, we start at the top with the Name. Our first metric we can capture is the CPU utilization of this compute instance so simply change the name to Compute CPU Utilization. Next, move down to the Configure metric query section. The first dropdown is Region and yes, you can have metrics on a single dashboard from not only multiple regions, but multiple compartments in those regions! Pretty useful if you say want to see the status of all your Autonomous Databases in multiple regions or how your load balancers are doing in Phoenix and Tokyo.
Ignoring Region for now, move to the next dropdown, Namespace. Using this dropdown in a region and compartment where you have a compute instance, we can see three entries relating to a compute instance.
We want to look at the oci_computeagent namespace. This namespace allows us to display metrics the compute agent is sending from the compute instance itself and where we will find metrics such as Memory and CPU utilization, disk IOPS and the load on the VM.
Choose CpuUtilization and set the next dropdown, Statistic, to mean. The upper region will refresh, and we will see a sample of what the chart will look like.