Introduction
How can we monitor specific endpoints in OIC? Here I'm referring to outbound invokes to 3rd party services.
For example, I have an integration that retrieves SR data from Fusion. This integration is being invoked by a call centre UI, so I need to monitor performance. Here's my simple SR retrieval integration -
Monitoring using OCI Service Metrics
adapterIdentifier -
As you've probably guessed, erp refers to the Fusion ERP adapter.
Here we see the GetServiceRequests endpoint.
You can choose from a variety of time intervals and statistics -
Here we see the GetServiceRequests endpoint.
You can choose from a variety of time intervals and statistics -
Here is the Fusion ERP invoke stats for the first flow -
It took 16s 986ms for the getSR request to complete.
Now back to OCI Service Metrics; I've clicked Update Chart, so let's view it -
I run the integration 10 times and now choose the Mean statistic. This will probably be the most popular, however, you may be interested in Max etc.
Just to recap what I've covered - the metric Outbound Request Invocation Time can be used to give us an insight into overall erp adapter performance. This we get by adding the dimension adapterIdentifier and selecting erp.
We can also drill deeper, by adding the dimension outboundInvocationEndpointInformation and selecting our endpoint, in my case, the get service request.
We can select different stats - mean, max, sum etc.
Finally, we can create OCI Alarms, based on the query -
This alarm can be set to fire on a condition of your choice. For example, in our call centre use case, the integration team have an internal SLA for retrieving SR data. This is set to 500 msecs.
We have the choice of creating the alarm on the integration itself and/or the invoke of Fusion.
Let's carry on with our current query -
OutboundRequestInvocationTime[1m]{resourceId = "yourOIC OCID", adapterIdentifier = "erp", outboundInvocationEndpointInformation = "Get ServiceRequests in ERP Cloud"}.grouping().max() > 500
So you could also create alarms, based on the response status from Fusion.
Some folks note that OCI Service Metrics charts are very basic, one very good reason to look at OCI Log Analytics.
Creating Log Analytics Dashboard Widgets
This we will now do, based on our query. The best place to copy the query from is the alarm definition -
I edit an existing dashboard and add a query based widget.
Summa Summarum
OCI Service Metrics for OIC are very useful for ad hoc or programmatic monitoring of your integration flows. The value add of OCI Alarms & Log Analytics just makes it easier for you to get the insight you need, when you need it!And speaking of alarms, mine has just fired; here's the mail I received -
Later, I receive an email, informing me the alarm has been deactivated - I wish my house alarm worked the same way!
Now to adding more data to the email - what do we require here? Naturally, how long the invoke took (in msecs) and when the violation ocurred.
This can be done by adding the following to the alarm body -
Now to adding more data to the email - what do we require here? Naturally, how long the invoke took (in msecs) and when the violation ocurred.
This can be done by adding the following to the alarm body -
No comments:
Post a Comment