Monday, November 30, 2026

#1197 - OIC tool to retrieve activity stream details

Introduction

This continues my set of posts on agent powered OIC observability. Today I'm looking at the monitoring api - get activity stream details - 

I run my create order integration, then execute the api in postman -

Here's an extract from the response -

Note the flowMilestones -
"flowMilestones": "r0,r0#m,s0Pre,sc0,w0Pre,s0Post,m1Pre,i0Pre,i0Post,m0Pre,y0#m,y0",

These milestones refer to the actions executed. You may notice some have pre and post entries.

Here is the integration - 

As you can see, r0 refers to message received (Trigger).

The code, r0#m, refers to message starts processing (Trigger).

The code, s0Pre, aligns to the SWITCH action. It's message is - Message entered Switch.

The code, sc0, aligns with the SWITCH condition route. 

The code, w0Pre, aligns with the WAIT action; it's message is Wait triggered.
The code, s0Post, aligns with the exiting of the SWITCH.  
The code, m1Pre, aligns with the MAP, before the Database invoke.
The codes, i0Pre and i0Post, refer to the INVOKE action.  
The code, m0Pre, aligns with the response MAP.
The code, y0#m, aligns with the response; its message is - Message sent to Reply.
The code, y0, aligns with the response; its message is - Reply to createOrder completed.

What does this look like, when I have an error? Let's resend order 100 - 

Note the error milestones etc.

I create an integration that invokes the api and I expose it as an agent tool - 

I get Claude to generate the relevant skills and expose the new tool thru my OIC MCP Gateway.

Let's execute the create order integration twice, with orderNrs 2112 and 3106.

Now to claude code - 


I ran the create order integration twice, once for orderNr 2112 and once for orderNr 3106. The instanceId for 3106
  is EkA9NeyYEfGp1FUNPB3CJg, the instanceId for 2112 is DBGZPuyYEfGRWO17ccV21Q. Why did 3106 take longer to execute?

Note the Findings - 


Findings:
- The Wait accounts for the whole difference. Without the 20.001 s Wait, order 3106 took about 308 ms, which is actually faster than order 2112's 576 ms. Most of 2112's time was a 391 ms gap between receiving the request and starting to process it (r0 → r0#m). That is normal startup variation, not a problem.
- The pattern across four runs: orders 3103 and 3106 both went through the Wait, and orders 100 and 2112 both skipped it. That fits a Switch condition based on the order number, for example a threshold somewhere between 2112 and 3103, or a rule for the 31xx range. The log only shows that the route taken has an empty condition (likely Otherwise), so the real rule is in the Switch definition in the designer.
- No errors, no child instances. Tracing is set to Production, so payloads weren't recorded.

If you want this confirmed from the data rather than four samples, I can pull CREATE_ORDER's integration stats. Runs that hit the Wait should show up as a cluster around 20 s, apart from the sub-second runs.

I reply - please do that -


This tool is great, however, it does require the instance id as request parameter. I want to make it easier to answer questions such as -  how did CREATE_ORDER in project AA_ANOMALY_DETECTION perform over the last 6 hours, and what caused any slow runs?

I create a new integration that leverages the get instances api - 
However, this time I query on integration e.g. https://design.integration.yourRegion.ocp.oraclecloud.com/ic/api/integration/v1/monitoring/instances?q={projectCode:'AA_ANOMALY_DETECTION',code: 'CREATE_ORDER', timewindow:'1h',+status:'COMPLETED'}&integrationInstance=yourOIC

This integration is then exposed as an Agent tool; as you can see, my toolkit is building up -


Back in claude code - how did CREATE_ORDER in project AA_ANOMALY_DETECTION perform over the last 6 hours, and what caused any slow runs?


All good, I then ask claude - > show me this on the nice chart you created for me


Looking up Project Integrations

Sometimes the user may not remember to which project an integration belongs; maybe she would simply like to enter a query such as - how was the performance of the create order integration over the last 1 day?

I added 2 new tools to my mcp server- list projects and list project integrations - 

These are based on the following 2 factory apis - 





I add these to Claude and then ask - 








I then ask -


Summa Summarum

Creating your own OIC Observability MCP server is easy, however, watch this space for product announcements in this space. 

Until then, Happy Monitoring!







 

Friday, November 27, 2026

#1196 - OIC tool for instance statistics

Introduction 



The underlying api is - https://design.integration.region.ocp.oraclecloud.com/ic/api/integration/v1/monitoring/integrations/CREATE_ORDER|01.00.0000/stats?type=extended&timezone=Europe/Berlin&q={timeInterval:'HOUR',timewindow:'1h', projectCode:'AA_ANOMALY_DETECTION'}&integrationInstance=yourInstance

As you can see, these are the stats for my ubiquitous create order integration.

I test the api in postman - 

Now to the parameters, beginning with the timewindow. These are the options from the UI - 1 hour translates to 1h, 1 day to 1d etc. Let's check out the custom date and how that surfaces in the url, namely in the query, q -  

q={timeInterval:'HOUR',startdate:'2026-11-26 07:00:00', enddate:'2026-11-27 07:55:58', projectCode:'AA_ANOMALY_DETECTION'}


Here we see that timewindow is not used; instead we have startdate and enddate.

The timeInterval parameter can have the values HOUR or DAY.

The parameter, type, can have the following value - extended.

The parameter, timezone, I set to my own, which is Europe/Berlin.
The query parameter, q, we've already met. This can include the timewindow, standard or custom, the sampling timeInterval, hourly or daily. It also includes the project identifier, projectCode.

Let's check the response the api call returns - 

{
    "extendedRecords": [
        {
            "avg": 3568.5,
            "sum": 21411.0,
            "min": 31.0,
            "max": 20138.0,
            "stdDeviationPopulation": 7415.020133710585,
            "variancePopulation": 5.4982523583333336E7,
            "stdDevBoundUpperPopulation": 18398.54026742117,
            "stdDevBoundLowerPopulation": -11261.54026742117,
            "beginTimeInterval": 1795698000000,
            "beginTimeIntervalAsString": "2026-11-26T14:00:00+0100",
            "instancesCount": 6
        },
        {
            "avg": 4236.2,
            "sum": 21181.0,
            "min": 142.0,
            "max": 20107.0,
            "stdDeviationPopulation": 7936.50435393316,
            "variancePopulation": 6.298810136E7,
            "stdDevBoundUpperPopulation": 20109.20870786632,
            "stdDevBoundLowerPopulation": -11636.80870786632,
            "beginTimeInterval": 1795701600000,
            "beginTimeIntervalAsString": "2026-11-26T15:00:00+0100",
            "instancesCount": 5
        },


Depending on timewindow and timeInterval, you may see multiple stat bundles i.e. one per hour/day.
Most fields are self-explanatory, however, beginTimeInterval is a msecs value (epoch) that can be converted to a valid dateTime e.g. 1795701600000 = 2026-11-26T15:00:00Z CET.

Here's an explanation of the population fields from the first bundle  - 

I create an integration that invokes the stats api, then run it - 


I then expose it as an agent tool - 

Create the relevant skills

I need to create the relevant skills, so the agent knows what the tool does and how to call it. It will also need to know the response format.

Claude did this for me, once I entered the rules, examples of which you've already seen.

Now to Claude Code - 

get me the stats for integration create order version 1. It's in the project aa anomaly detection. I need the stats
  for the last 3 days on an hourly basis. first give me the data that show it in a chart

Here's the interactive chart Claude generated - 

Summa Summarum

The ability to expose observability tools opens up a whole new vista of possibilities for OIC admins. 

Watch this space to see what future releases will offer in this space.

Appendix I

For those interested - here is the skills file Claude generated for me - 

---
name: oic-integration-stats
description: Use when asked about the performance, throughput, volume, response times, trends or anomalies of an OIC integration over time - e.g. "how is create order performing today?", "any slow periods for PROCESS_ORDER in the last 6 hours?", "show hourly stats for this integration", "is this integration behaving abnormally?". Calls the get integration stats tool and explains the per-interval statistics (count, avg, min, max, std deviation, bounds), highlighting outliers, gaps and spikes.
---

You analyse the runtime performance of OIC integrations using the get integration stats tool.

## Calling the tool

Request parameters:

integration - the integration code. It MUST be upper case, with an underscore _ in place of every space and hyphen.
  - Convert whatever the user enters: "create order" → CREATE_ORDER, "Process Order" → PROCESS_ORDER.
  - Trim leading/trailing spaces first, and treat several spaces in a row as one underscore ("create  order" → CREATE_ORDER).
  - Hyphens - also become underscores: "AA-Anomaly-Detection" → AA_ANOMALY_DETECTION, "create-order" → CREATE_ORDER. A mix of spaces and hyphens together (e.g. "create - order") becomes one underscore.
  - Only spaces and hyphens become underscores; keep all other characters as they are (upper-cased).
  - If the user already gives a code (e.g. CREATE_ORDER), use it as is.

integrationVersion - MUST be in the format version.major.minor as NN.NN.NNNN: two digits, two digits, four digits, zero-padded, e.g. 01.00.0000.
  - Convert whatever the user enters, ignoring a leading "v", "V" or "version":
    - v1 → 01.00.0000
    - v1.1 → 01.01.0000
    - v1.1.5 → 01.01.0005
    - v2.3.12 → 02.03.0012
    - 1.0 → 01.00.0000
    - version 3 → 03.00.0000
  - Missing parts are 0. Pad each part with leading zeros to 2, 2 and 4 digits.
  - If the user already gives the full format (e.g. 01.00.0000), use it as is.
  - If the user gives no version, ask for it, or look it up (see below). Don't assume 01.00.0000.
  - If a part is too long to fit (e.g. v123), tell the user the version isn't valid and ask again.
  - Tell the user the integration code, version and project code you used.

project - the project code. It MUST be upper case, with an underscore _ in place of every space and hyphen - the same rule as integration.
  - Convert whatever the user enters: "AA anomaly detection" → AA_ANOMALY_DETECTION.
  - Trim leading/trailing spaces first, and treat several spaces in a row as one underscore.
  - Hyphens - also become underscores: "AA-Anomaly-Detection" → AA_ANOMALY_DETECTION, "create-order" → CREATE_ORDER. A mix of spaces and hyphens together (e.g. "create - order") becomes one underscore.
  - Only spaces and hyphens become underscores; keep all other characters as they are (upper-cased).
  - If the user already gives a code (e.g. AA_ANOMALY_DETECTION), use it as is.

timeWindow - how far back to look. It MUST be exactly one of these values: 1 hour, 6 hours, 8 hours, 1 day, 3 days, 8 days, 32 days. No other values are allowed - not codes such as 1h or 1d.

timeInterval - the size of each bucket in the results. It MUST be sent as exactly hourly or daily, in lower case. No other values are allowed - not HOUR or DAY.
  - Users may enter hourly or daily in any case (e.g. "Hourly", "DAILY", "show daily stats"); send it in lower case. Also accept hour / day / HOUR / DAY / per hour / per day / by hour / by day, and convert them: hour → hourly, day → daily.
  - If the user doesn't say, choose using the rules below.

customFromDate / customToDate - a custom time period. Both MUST be in the format YYYY-MM-DD hh:mi:ss (24-hour clock), e.g. 2026-11-26 08:25:00.

Use EITHER timeWindow OR customFromDate + customToDate - never both in the same call. When using a custom period, leave timeWindow out; when using timeWindow, leave both custom dates out. Always send customFromDate and customToDate together.

Time zone - the default time zone is Europe/Berlin (CET, UTC+01:00 in winter; CEST, UTC+02:00 in summer, from the last Sunday of March to the last Sunday of October).

- customFromDate and customToDate are Europe/Berlin local times. Times the user gives are taken as Europe/Berlin unless they name another zone.
- If the user gives a time in another zone (e.g. "08:00 UTC", "9am New York"), convert it to Europe/Berlin before sending, and tell the user the converted values.
- Times from other tools in UTC (e.g. receivedDate from the retrieve instance hierarchy tool, +0000) must be converted to Europe/Berlin before being used as customFromDate / customToDate, e.g. 2026-11-26T07:35:50+0000 → 2026-11-26 08:35:50.
- "Today", "yesterday", "now" etc. mean the current date and time in Europe/Berlin.
- Show all times to the user in Europe/Berlin and label them (CET or CEST).

Map the user's request to these:

- A relative period ("last 6 hours", "today", "this week") - set timeWindow to the allowed value that matches. If the request doesn't match one exactly, use the smallest allowed value that covers it (e.g. "last hour" → 1 hour, "today" → 1 day, "last 2 hours" → 6 hours, "last 12 hours" → 1 day, "this week" → 8 days, "last 2 weeks" → 32 days) and only report on the period the user asked for. Tell the user which window you used.
- More than 32 days back from now - use 32 days and say so, unless the user gave specific dates (then use a custom period).
- Specific dates or times ("from 26 Nov 08:25 to 10:00", "yesterday between 9 and 5", "on 20 Nov") - use a custom period:
  - Convert to YYYY-MM-DD hh:mi:ss, e.g. "26 Nov 8:25am" → 2026-11-26 08:25:00.
  - A date with no time: from = 00:00:00, to = 23:59:59 (e.g. "on 20 Nov" → 2026-11-20 00:00:00 to 2026-11-20 23:59:59).
  - A time with no date: assume today. A date with no year: assume the current year, unless that puts it in the future, then the previous year.
  - "yesterday" etc. - work out the actual date from today's date.
  - If customFromDate is after customToDate, or the end is in the future, fix it (swap, or set the end to now) and tell the user.
  - If the user gives only a start or only an end, ask for the other one, or use now as the end if they said "since …".
  - Show the user the exact from and to values you used.
- If the user gives both a relative period and dates, use the dates (custom period) and ignore the relative period.
- timeInterval with a custom period - use hourly if the period is 1 day or less, daily if longer (hourly for up to 3 days only if the user asks for hour-by-hour detail).
- timeInterval with timeWindow - use hourly for 1 hour, 6 hours, 8 hours and 1 day; use daily for 3 days, 8 days and 32 days. Use hourly for 3 days only if the user asks for hour-by-hour detail. Never use hourly for 8 days or 32 days (too many rows to read). If the user asks for any other granularity (e.g. "every 15 minutes", "weekly"), say only hourly or daily is available and use the nearest one; for weekly, use daily and summarise by week yourself.
- If the user doesn't give the version or project, look them up, e.g. from the retrieve integration instances tool (integration / projectCode) or the retrieve instance hierarchy tool (flowVersion / projectCode), or ask. Don't guess them.
- If the stats call returns nothing for a converted integration or project code, the code may differ from the display name (e.g. a different word or abbreviation). Check the real code with those tools before telling the user there is no data.
- Codes are exact strings: keep case, spelling and version.

## Understanding the response

extendedRecords is an array of sets of stats, one set per time bucket. The number of sets returned depends on timeWindow (or the custom period) and timeInterval - it is the length of the period divided by the interval:

| timeWindow | timeInterval | Sets of stats returned |
|---|---|---|
| 1 hour | hourly | 1 |
| 6 hours | hourly | 6 |
| 8 hours | hourly | 8 |
| 1 day | hourly | 24 |
| 3 days | hourly | 72 |
| 3 days | daily | 3 |
| 8 days | daily | 8 |
| 32 days | daily | 32 |
| custom period | hourly / daily | one per hour / day in the period |

A set is returned for every bucket in the period, including buckets where nothing ran (instancesCount 0). Use this to check the response: if you get fewer sets than expected, mention it. The most recent set may be the current hour or day, still in progress, so its figures can be partial - say so.

One set of stats looks like this:

{
  "avg": 4236.2,
  "sum": 21181.0,
  "min": 142.0,
  "max": 20107.0,
  "stdDeviationPopulation": 7936.50435393316,
  "variancePopulation": 6.298810136E7,
  "stdDevBoundUpperPopulation": 20109.20870786632,
  "stdDevBoundLowerPopulation": -11636.80870786632,
  "beginTimeInterval": 1795701600000,
  "beginTimeIntervalAsString": "2026-11-26T15:00:00+0100",
  "instancesCount": 5
}

Read it as: in the hour starting 15:00 CET on 26 Nov 2026, 5 instances ran, taking 21,181 ms in total and 4,236 ms on average; the fastest took 142 ms and the slowest 20,107 ms.

Each set has:

beginTimeInterval - the start of the bucket as epoch milliseconds

beginTimeIntervalAsString - the same start time as a readable string. It carries a timezone offset (e.g. +0100 = Europe/Berlin winter time), unlike the instance hierarchy tool, which returns UTC. Show it in Europe/Berlin time; if the offset returned is not the Europe/Berlin offset for that date, convert it using beginTimeInterval (epoch ms, always UTC).

instancesCount - how many instances ran in that bucket (volume / throughput)

avg - mean execution time in milliseconds

sum - total execution time of all instances in the bucket, in ms (sum = avg x instancesCount)

min / max - fastest and slowest instance in the bucket, in ms

stdDeviationPopulation - population standard deviation of execution time, in ms

variancePopulation - population variance (std deviation squared), in ms squared. Don't show this to the user; use the std deviation instead.

stdDevBoundUpperPopulation / stdDevBoundLowerPopulation - the normal range for the bucket, avg + 2 x std deviation and avg - 2 x std deviation. An execution time outside this range is an outlier. The lower bound can be negative; treat a negative lower bound as 0.

id and links - metadata, ignore.

Important:

- A bucket with instancesCount 0 means nothing ran. Its min is the string "Infinity" and its max is "-Infinity", and its other values are 0. Treat it as "no traffic", never as numbers. Don't include empty buckets in averages, mins or maxes.
- All durations are in milliseconds. Show them as ms, or in seconds when 1000 or more (e.g. 20.0 s).
- Buckets may not be returned in time order; sort by beginTimeInterval.

## What to work out

Calculate, don't estimate:

1. Totals for the whole period: total instances (sum of instancesCount); overall average = sum of all sum values / total instances (not the average of the bucket averages); overall min and max across non-empty buckets.
2. Typical execution time. When a bucket's max is well above its avg, one slow instance may be skewing the average. Work out the average without the slowest: (sum - max) / (instancesCount - 1). If that is much lower than avg, say the average is being pulled up by one slow instance.
3. Outliers: for each bucket, max above stdDevBoundUpperPopulation means at least one instance ran abnormally long. Report the bucket, the max, the bound, and how many times the typical time it is.
   With only a few instances in a bucket, one very slow instance inflates the std deviation so much that it can stay just inside the bound. Don't rely on the bound alone: also flag a bucket when max is more than about 10x the average without the slowest (point 2). Example: the 15:00 set above has max 20,107 ms, just under its upper bound of 20,109 ms, yet the other 4 instances averaged only 268.5 ms ((21,181 - 20,107) / 4). That slowest instance is about 75x typical and is an outlier.
4. Slow periods: buckets whose avg is well above the overall average, e.g. more than 2x.
5. High variability: buckets where stdDeviationPopulation is larger than avg. This means execution times are erratic, not just slow.
6. Volume: the busiest and quietest buckets, runs of empty buckets (gaps in traffic), and sudden spikes or drops compared with neighbouring buckets. An unexpected gap can mean the source system stopped sending, or the integration was deactivated.
7. Trend: whether avg or volume is rising or falling across the period, if there are enough buckets to say so (at least 4 non-empty).

Only report what the data supports. A bucket with 1 instance has no meaningful std deviation; don't call it consistent or erratic.

## Output to the user

One-line summary - integration, version, period, total instances, overall average, and the headline (e.g. "one 20 s outlier, otherwise fast").

A table, one row per bucket in time order:

| Interval start | Instances | Avg | Min | Max | Normal range (avg ± 2σ) | Note |

Show empty buckets as a row with "—" for the times and "no traffic" in the note. Mark outliers and slow buckets in the Note column.

Findings - 2-5 bullets from "What to work out".

Next steps, when relevant:

- For an outlier or slow bucket, offer to find the instances in that window with the retrieve integration instances tool, then use the retrieve instance hierarchy tool on the slow instance to see which child integration took the time, and the retrieve errors by instance id tool if any failed.
- For gaps in traffic, suggest checking the source system and whether the integration was active then.

## Worked example

The sample response, for one integration, with timeInterval = hourly:

Summary: 9 instances between 08:00 and 11:00 CET (Europe/Berlin) on 27 Nov 2026, overall average 2,345 ms. One instance took 20.0 s; the other 8 averaged about 130 ms.

| Interval start (Europe/Berlin, CET) | Instances | Avg | Min | Max | Normal range | Note |
|---|---|---|---|---|---|---|
| 27 Nov 08:00 | 8 | 2,618 ms | 31 ms | 20,046 ms | 0 - 15,794 ms | outlier: max is above the range |
| 27 Nov 09:00 | 0 | — | — | — | — | no traffic |
| 27 Nov 10:00 | 1 | 163 ms | 163 ms | 163 ms | — | single instance |

Findings:

- One instance in the 08:00 hour took 20,046 ms, above that hour's normal range of up to 15,794 ms. Without it, the other 7 averaged 128 ms ((20,942 - 20,046) / 7), so the 2,618 ms hourly average comes from that one instance alone. It was about 150x slower than typical.
- The std deviation in the 08:00 hour (6,588 ms) is more than double the average, which also points to one extreme value rather than general slowness.
- No instances ran between 09:00 and 10:00.
- The single 10:00 instance (163 ms) is in line with the typical time.

Next step: find the instances from 08:00-09:00 with the retrieve integration instances tool, then run the retrieve instance hierarchy tool on the slow one to see where the 20 s went.




 
 




Thursday, November 26, 2026

#1195 - OIC tool for instance hierarchy

Introduction 

This post is a follow up to post #1193, where I discussed OIC monitoring from claude code. Let's add some more functionality, namely. the hierarchy view OIC provides for integration runtime.

This hierarchy viewer is very useful. From the UI, you can access it as follows - Observe - Instances - 


 This is a simple example, where process order invokes create order - 

I get url invoked to retrieve this data via Developer tools -


Then try it out in postman - 

The url format - https://design.integration.yourRegion.ocp.oraclecloud.com/ic/api/integration/v1/monitoring/instances/yourInstanceId/hierarchy?integrationInstance=yourIntegrationInstance

I create an app driven integration that invokes the api, and then expose the integration as an agent tool.


 

Here's the addition to the skills used in the previous post - 

I gave Claude the basics and it generated it for me.

Now to testing - 

Summa Summarum

As you can see, it's simple to expose the hierarchy functionality as an agent tool. With the appropriate skills, it can provide immediate value add in your chat interface.



Tuesday, November 24, 2026

#1194 - OIC connecting to FileZilla server

Introduction 

This post is essentially a note for myself. Sometimes I need access to a 3rd party ftp server; I could use a remote OIC File Server, but I have FileZilla server running on my laptop.

I access this via the connectivity agent, which is also running on my laptop.

One thing to note - The free version of FileZilla server does NOT support sftp.

Defining the ftp connection in OIC

The ftp connection in OIC is defined as follows - 
  • FTP Server Host Address - 127.0.0.1
  • FTP Server Port - 21
  • Optional Properties
    • SFTP Connection - No
    • FTP Server OS - Unix
  • Security Policy - FTP Server Access Policy
    • then enter fileZilla user/pwd

My FileZilla user, niallc has the following home folder - 

The folder has the following contents - 

Now to my scheduled integration that uses the connection to list files. Note, the list files invoke is configured to search the virtual path /niallcFiles - 

Run the integration -