Thursday, December 3, 2026

#1200 - OIC tool for observing errors

Introduction 


The tool is based on the OIC factory api - 


Here's the integration - 

The REST trigger -

The query can be simple or complex, depending on the user input. the query parameter, q, can include the following - 
I prompted claude with the factory api docs and some examples; it created the relevant skill.


I ask claude to get me the errors for the last 24 hours - 

I get Claude to generate an errors dashboard - 

Summa Summarum

OIC already records every error; but, sometimes. the hard part is finding the ones that matter. With this tool, you just ask: "any errors in the last 24 hours for the create order integration?" or "what happened to orderNr 310138?" Claude turns the question into the right factory API query and calls the tool. Then it does the work an admin would otherwise do by hand. It groups the errors by cause, finds the failing connection or step, shows whether they came in a burst (most likely a target system outage) or a steady trickle (most likely bad data), and says which ones can be resubmitted.

Add the tools for async queue depth (#1198) and billed messages (#1199), and you have a natural-language observability layer for OIC. It answers what failed and why, how full the queue is, and what that is costing you. If you want a dashboard instead of an answer, ask Claude for one. The OIC admin decides what to look at and how to see it. No custom monitoring UI needed.


 





  


Wednesday, December 2, 2026

#1199 - OIC tool for querying Billing service metric

Introduction 





The underlying metric is called -BilledMessageCount

This metric supports a couple of dimensions such as -

We can amend this query to group by integrationFlowIdentifier. This will return a response like - 

[ {
  "namespace" : "oci_integration",
  "name" : "BilledMessageCount",
  "dimensions" : {
    "integrationFlowIdentifier" : "ASYNC_CREATE_ORDER!01.00.0000"
  },
  "metadata" : {
    "displayName" : "Consumed Messages"
  },
  "resolution" : "",
  "aggregatedDatapoints" : [ {
    "timestamp" : "2026-12-01T08:00:00.000Z",
    "value" : 6125.0
  } ]
}, {
  "namespace" : "oci_integration",
  "name" : "BilledMessageCount",
  "dimensions" : {
    "integrationFlowIdentifier" : "GET_ASYNC_QUEUE_DEPTH!01.00.0000"
  },
  "metadata" : {
    "displayName" : "Consumed Messages"
  },
  "resolution" : "",
  "aggregatedDatapoints" : [ {
    "timestamp" : "2026-12-01T08:00:00.000Z",
    "value" : 13.0
  }, {
    "timestamp" : "2026-12-01T09:00:00.000Z",
    "value" : 1.0
  } ]
}, {
  "namespace" : "oci_integration",
  "name" : "BilledMessageCount",
  "dimensions" : {
    "integrationFlowIdentifier" : "GET_MESSAGES_RECEIVED_COUNT!01.00.0000"
  },
  "metadata" : {
    "displayName" : "Consumed Messages"
  },
  "resolution" : "",
  "aggregatedDatapoints" : [ {
    "timestamp" : "2026-12-01T08:00:00.000Z",
    "value" : 5.0
  } ]
} ]

I create an integration that invokes the OCI metric api - 

I set the query to - 

'BilledMessageCount[60m]{resourceId = "myOIC OCID"}.groupBy(integrationFlowIdentifier).sum()'

The invoke configuration - 

Request - 

Response - 

I expose the integration as a tool, get Claude to generate the skill, then test -

give me an overview of the billed messages from the last 24 hours

Here's the text - 

What stands out

- All of the cost is ASYNC_CREATE_ORDER. Everything else is a few dozen messages from the monitoring integrations, including the calls I just made.
- The load comes in bursts. 99.7% of the day's messages fell in 2 of the roughly 25 hours. Split evenly, the day's total would average about 1,000 messages per hour, well within 1 pack.
- The peak hour is exactly 3 × 6,125 (18,375). That looks like the same order batch ran three times in that hour, or a single run where each order counted as 3 messages (inbound payloads of about 100–150 KB). Comparing with the number of instances received would tell which.
- Whether this is really overage depends on your packs. With 4 or more non-BYOL packs, or 1 BYOL pack (20,000 per hour), no hour went over. Going over the packs also doesn't raise the concurrency limits, so the 14:30 burst probably built up a backlog in the async queue.

The next section - 

Here's the text - 

Next steps

1. Tell me how many message packs you have and whether they're BYOL, and I'll confirm whether any hour was really overage.
2. I can pull the number of instances ASYNC_CREATE_ORDER received at 14:30–15:30 CET to see whether it was 3 batches or larger payloads.
3. Spreading that batch load over several hours would keep it within fewer packs. An OCI alarm on BilledMessageCount would flag hours like these as they happen.

I ask for a dashboard -

and get the following - 

Summa Summarum

It just took me a couple of hours to get this up and running. I didn't review the skills, nor did I ask Claude to make any changes to the dashboard. So add in a couple of hours for such and then you have agent powered OIC Billing Observability. 















Tuesday, December 1, 2026

#1198 - OIC tool for querying AsyncQueueDepth metric

Introduction 

The claude output is based on a OIC tool, that itself leverages the OCI Service Metrics api. Let's begin by checking out the service metric - AsyncInboundRequestsDepth - 


This service metric can be accessed via the OCI console page for your OIC instance; just click on Monitoring - 

Let's expose this data as an agent tool. Firstly, you will need to give OIC access to service metrics; I've already done so, but the policies required are as follows -

allow any-user to read metrics in compartment <compartment-name>
  where all {request.principal.type = 'integrationinstance',
             request.principal.id   = '<OIC instance OCID>'}

allow group <group-name> to read metrics in compartment <compartment-name>
 

The REST connection is configured with the following base url -https://telemetry.us-phoenix-1.oraclecloud.com

Security is set to - 
The invoke is configured as follows - 

/20180401/metrics/actions/summarizeMetricsData

The response - 

[ {
  "namespace" : "oci_integration",
  "resourceGroup" : null,
  "compartmentId" : "yourCompartmentId",
  "name" : "AsyncInboundRequestsDepth",
  "dimensions" : {
    "resourceId" : "123"
  },
  "metadata" : {
    "displayName" : "Async Queue Depth"
  },
  "resolution" : null,
  "aggregatedDatapoints" : [ {
    "timestamp" : "2026-12-01T06:41:00.000Z",
    "value" : 0.0
  }, {
    "timestamp" : "2026-12-01T07:49:00.000Z",
    "value" : 5433.0
  }, {
    "timestamp" : "2026-12-01T07:50:00.000Z",
    "value" : 5433.0
  } ]
} ]

This is also the REST trigger response.

I expose the integration as an agent tool, get Claude to generate the relevant SKILL.md file, based on my input -

Now to testing - 

I ask - what is the current state of the async queue?

Here's the text - 

The async queue is draining. As of 09:25 CET it holds 2,040 messages, about 4.1% of the 50,000 limit for a 1-pack instance. It is going down by about 79 messages a minute, so it should be empty in about 26 minutes, around 09:51 CET, if nothing new arrives in a burst.

I looked at the last hour, 08:25–09:25 CET (07:25–08:25 UTC). All 61 one-minute readings are there, with no gaps. I don't know how many message packs the instance has, so I've measured against the 1-pack limit of 50,000, which is the worst case.


Findings
- Burst: Between 08:38 and 08:42 CET, about 5,900 messages arrived in 4 minutes. That's roughly 1,350 per minute coming in, more than the instance can process at once, so they waited in the queue. Queuing during a burst like this is normal.
- Peak: The highest point was 5,855 messages at 08:42–08:43 CET, 11.7% of the limit. There was no risk of new requests being rejected (HTTP 429).
- Drain rate: All drain rates are net of new arrivals, so OIC is actually processing faster than these numbers.
  - From 08:43 to 09:09 the queue went down slowly, at about 63 messages a minute.
  - From 09:09 to 09:13 it went down much faster, at about 310 a minute. Something freed up processing slots or arrivals dropped in those minutes.
  - Since 09:13 it has gone down by about 79 a minute (about 4,760 an hour).
  - Over the whole time since the peak, it averaged 91 a minute.
- No stuck periods: The depth stayed the same for only single minutes (08:49→08:50 and 09:02→09:03), then kept falling.
- Headroom: Even with only 1 pack, there is room for about 47,960 more messages.

Let's improve this...

We need insight into the queue, i.e. for which integrations are requests queued. Looking at OIC Observability - Integrations - 

The data shown is retrieved via a factory api - 

https://design.integration.yourRegion.ocp.oraclecloud.com/ic/api/integration/v1/monitoring/integrations?offset=0&limit=999&q={timewindow:'1h'}&orderBy=time&return=monitoringui&integrationInstance=yourOICInstance


I try out this api in Postman and see the following response -

{
    "dataFetchTime": "2026-12-01T13:17:57.885+0000",
    "items": [
        {
            "code": "ASYNC_CREATE_ORDER",
            "flowStatus": "ACTIVATED",
            "id": "ASYNC_CREATE_ORDER|01.00.0000",
            "lastUpdated": "2026-12-01T13:17:47.769+0000",
            "lastUpdatedString": "1 Dec 2026 13:17:47 GMT",
          ...
            "mepType": "MEP00",
            "name": "async create order",
            "noOfAborted": 41,
            "noOfErrors": 0,
            "noOfMsgsProcessed": 1961,
            "noOfMsgsReceived": 18375,
            "noOfSuccess": 1920,
            "optimizedVersion": "1.0",
            "projectCode": "AA_2604_NEW_FEATURES",
            "scheduleApplicable": false,
            "scheduleDefined": false,
            "successRate": 97,
            "version": "01.00.0000"
        },
        {
            "code": "SYNC_CREATE_ORDER_WITH_WAIT",
            "flowStatus": "ACTIVATED",
          ...

I create an integration, that uses this api and I expose it as a tool -

Again, I give Claude the relevant intel and ask it to generate the SKILL.md for this tool.

I then ask - what is the current state of the async queue? If filling up, which integration requests are being queued? 



Summa Summarum

As you can see, the combination of the service metrics API and the agent/LLM is very powerful. This is what ops folks want to know; not just how deep is the queue, but, also, what's queued and how quickly is it draining. They also need to monitor the queue depth in respect of the queue size limit. This tool covers all of these.

So from this - 

to this - 


is a great leap in intel offered, yet simple to implement.