OIC Health Check by OCI Monitoring and Alarm

In this blog I would like to show you how OIC instance health check can be done easily with OCI Monitoring Service. Well, just want to say for those who are not familiar with of OCI and OIC; OCI stands for Oracle Cloud Infrastructure (https://www.oracle.com/au/cloud/) which is Oracle’s next generation cloud infrastructure. OIC means Oracle Integration Cloud (https://docs.oracle.com/en/cloud/paas/integration-cloud/index.html)

Now I’ve got two things are in my mind;

  1. Find out a simple and quick way to check OIC runtime is alive at least whether it’s responding to API request. Let’s put aside monitoring OIC design time.
  2. Would like to be notified by email with some sort of message warning me.

Then almost immediately got my answer;

  • Published or activated integration from OIC provides metadata which shows very useful information including API documentation in Swagger or Open API. And getting metadata doesn’t require no authentication. So I’ll use the end point of this metadata for health check. Echo is prebuilt integration which comes with every OIC instance, let’s use this integration.
  • OCI Notification Service will send warning email to me. So I just set up Topic and then configured Subscription by my email, done.

Now I’m ready with monitoring target for health check and email notification for the health check warning.

Let me start with OCI Health Checks setup by click “Create Health Check” button. It is available under Monitoring menu of OCI console as below. I’m doing this from my sandbox compartment. Compartment is very important construct from OCI, make sure you know what it does (https://www.ateam-oracle.com/oracle-cloud-infrastructure-compartments). Also I double checked that I had right OCI Policies added for reading metrics from my compartment (https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Concepts/commonpolicies.htm#metrics-access).

Then just I just enter required information as below;

I named it OIC_HEALTH_CHECK.

The required input explains itself. Selected 60 seconds for health check interval. After creation, I can see health check history as below. You can see two vantage points with AWS and Azure which configured from previous step.

Now I can get check metrics for my health check as below;

There are several metrics available from OCI Health Check but I’ll use the metrics for HTTP(S) TEST SUCCESS RATE as below, to check my OIC instance availability. It comes with 100% or one for success and zero for failure.

Let’s bring down OIC instance and see what we’re getting.

OIC instance was fully stopped.

So OCI Health Check is getting “Unavailable” from all vantage points for the target endpoint which is expected. The metrics for HTTP(S) TEST SUCCESS RATE also came with zero as below. Seems OCI Health Check does what I need.

The beauty of OCI Monitoring Service is from this point. OCI Monitoring Service comes with Alarm feature, already integrated natively with the metrics we saw from previous step. So, I can create the alarm based on metrics query for HTTP(S) TEST SUCCESS RATE from the options just like below;

Then I just need to enter alarm name ALARM_OIC_NA and take all default values as below;

For trigger rule, I change it to less than one which means OIC is not responding properly for integration metadata URL decided from the beginning.

lastly, I just need to select Topic I created before. Save it now.

It’s enabled by default and ready to send me alarm as below;

I started OIC instance and then ran several test cases for a couple of minutes. Again I’m bringing it down to get notification. And finally, it went down.

I can see alarm got triggered within a couple of minutes as below;

Let’s see what I’ve got from my gmail by.

Awesome, I’ve got an email from ALARM_OIC_NA Alarm as below;

Now you reached end of this post and appreciate for your reading.

I have no doubt that OCI Monitoring Service will make your life easy by providing out of box dashboards, metrics and seamless integration with your monitoring target.

Don’t forget about OIC has out of box dashboards for monitoring and especially Integration Insights capability for end to end business metrics monitoring (https://blogs.oracle.com/integration/empower-your-business-users-with-integration-insight)

Author: Jin Park

Currently working as Oracle ANZ Cloud Platform Solution Engineer and looking after iPaaS solution. Got years of experience as a consultant within IT industry related to development, support, design. Experienced in industries such as government, utilities (Water, Transport), vehicle security.

One thought on “OIC Health Check by OCI Monitoring and Alarm”

Leave a comment