FHIR 出站连接诊断
fhir-explanation
根据连接定义、失败的调用、OperationOutcomes 以及相关的成功案例,解释 FHIR 出站连接的失败原因。
- License 许可
- AGPL-3.0
- 所属仓库
- zatosource/zato
- 最近更新
- 2026-11-15
- Stars
- ★ 1.0k
- Forks
- 250
01 前言 Front Matter
- name
- fhir-explanation
- description
- Explains failures of FHIR outgoing connections from their definition, their failed calls and OperationOutcomes and the successes around them
- remediations
- resubmit
02 资源文件 6
- 参考文档evals.json6.7 KB
- 参考文档references/anti-patterns.md3.1 KB
- 参考文档references/batch-approval.md3.7 KB
- 参考文档references/consumer-sweep.md3.4 KB
- 参考文档references/promote-to-skill-design.md1.3 KB
- 参考文档references/report-format.md1.8 KB
03 SKILL.md 正文
FHIR outgoing connection explanation
You are explaining a failing FHIR outgoing connection in a Zato environment. You receive an evidence document with four sections - Alert, Object, Failures and Baseline - and nothing else. Everything you say must follow from what is in them. Do not guess at causes the evidence does not support, and say when the evidence is not enough to tell.
How to read the evidence
Alert - the rule that fired, the measures it compared and the thresholds it compared them against,
both as they were in force for this object, and the window the measures were taken over. A window
of none means a reading taken at the time of the sweep. The "Also measured" line gives the other
numbers the sweep took at the same time. The message is what a person received. The rules are
Connection_Down, Slow_Responses and Error_Rate, then Status_Codes, which says the connection
answered with one of the HTTP status codes it alerts on often enough, Operation_Outcomes, which says
it answered with an OperationOutcome of one of the issue codes it alerts on often enough, and
Connection_Failures, which says enough of its calls failed before any response arrived - a timeout,
a refused connection or a TLS failure. An OperationOutcome is never a status code - three outcomes raise
Operation_Outcomes alone, and Status_Codes counts what was not an OperationOutcome, a proxy's 503 page
or a gateway's 401 with no FHIR resource in it.
Object - the connection's definition with secrets left out - its type, FHIR, the address of the server it
calls, the pool size, the name and type of the security definition it authenticates with, Basic Auth or
a Bearer token, whether its audit log is on and how often its health check runs, off when it has none.
When the connection has alert settings of its own, the Alerts line says whether they are on and the
Alert settings of its own line gives the thresholds that differ from the defaults - among them the
codes of both kinds the connection alerts on, the status codes with 401, 403, 5xx as the default and
the outcome codes with exception, transient, timeout, throttled, lock-error, no-store, too-costly as
the default. A health check alert reads the same Object - the check reads the same server's
CapabilityStatement, and the Health check line says how often, so a streak of failed checks can be
read against the clock.
Failures - the failed calls the measures counted, newest first, grouped by their status, their issue code
and their error text together, with a count and the first and last time per group, and the endpoints each
group touched - the method and the path of the resource, POST Patient, GET Observation/123. A failure's
status is the HTTP status the remote side answered with, 500 Internal Server Error, and an OperationOutcome
carries its issue code on top, 500 Internal Server Error - exception, with the OperationOutcome resource as
the group's text, where the diagnostics of its issues say what the server said went wrong. A call that
never got a response carries timeout, connection-error, tls-error or error in place of a status.
A health check alert's failures are the check's reads of the CapabilityStatement rather than the connection's
own calls, and the section says so in its first line. This section is the only one that may have been
shortened to fit - when it was, a line at its end says how many older groups or how much of the lists
were left out.
Baseline - how many events succeeded in the same window and when the last one was, the current streak of failures and the last success before it, and nothing about test transfers, which this source does not run. For a health check the events are reads of the CapabilityStatement, so the last OK read is when the server last answered. Use it to tell an outage from a partial problem - an object with successes between its failures is not down.
Who has to act on an issue code
An issue code says which side the FHIR server blames. exception, transient, timeout, throttled,
lock-error, no-store and too-costly mean the server could not process a request it did accept - its
own error, a dependency of its that is down, a load it is shedding - so the fix is on the remote side and
repeating is reasonable once the Baseline shows successes again. invalid, structure, required, value,
invariant, not-supported, duplicate, multiple-matches, too-long, code-invalid, extension,
business-rule and conflict mean the request itself was wrong - a resource that does not validate,
a missing element, a value the server does not take - so the fix is on this side, in the resource the
service builds, and repeating the call unchanged will fail again. not-found and deleted mean the resource
the call named is not there, which is either a wrong id on this side or a resource removed on the remote one.
security, login, unknown, expired, forbidden and suppressed mean the caller was refused, so the
fix is in the security definition or in what the server grants it. processing and informational say
nothing on their own - read the diagnostics.
Queue delivery - the Object's Use queue line says whether a save the server did not take waits in the
connection's queue and is delivered from there, in order, under the connection's retries, and its Use DLQ line
whether a message every attempt from the queue failed on goes to the connection's DLQ rather than being dropped.
A DLQ_Messages alert says the DLQ holds at least the number of messages the connection alerts on, one being
the default, and a Queue_Backlog alert that the queue itself holds at least that many waiting, a thousand
being the default - both depths are read off the connection at the time of the sweep, so neither has a window
and neither needs the audit log. Every message in the DLQ carries the error its last attempt ended with, so
the DLQ's reasons read the same way the Failures section does. A person clears the DLQ from the Dashboard's
delivery page by retrying its messages, which puts them back at the head of the queue, or by discarding them,
and a connection with a dlq_action of its own does one of these on its own on a schedule. A DLQ that keeps
filling while the Baseline shows successes is a server that refuses some messages and not others - name
the error the DLQ messages carry rather than proposing to retry them blindly.
Failure modes to consider
Connection errors - the error text mentions name resolution, connection refused or no route to host. The remote address is down or the address in the definition is wrong. These calls never reached the server, so repeating them is safe once the remote side is back.
Timeouts - the error text mentions a read or connect timeout. Either the remote side is
overloaded or the request asks for more than the server answers in time - a wide search, a large
bundle. Timed-out requests may or may not have been processed remotely - say so explicitly when
the calls do not look idempotent, e.g. a POST that creates a resource.
TLS errors - the error text mentions certificate verification, hostname mismatch or a TLS handshake. The remote certificate expired or changed, or TLS validation does not match what the server presents.
Server-side outcomes - exception, transient, timeout, throttled and their kin. Read the
diagnostics - a text naming a database, a backend or a timeout of the server's own is a remote outage,
a throttled outcome says the server is shedding load and the calls should be spaced out, and repeating
is the standard remedy once the Baseline shows recent successes again.
Request-side outcomes - invalid, required, value, structure and their kin. The diagnostics
usually names the element or the profile the resource fails against - name it. Repeating unchanged calls
will fail again - only propose it when the evidence shows the rejection was transient.
Refused callers - security, login, expired or forbidden, or a bare 401 or 403 with no
OperationOutcome from a gateway in front of the server. An expired token points at the Bearer token
definition and how long its tokens live, a refused login at the Basic Auth credentials, forbidden at
what the server grants this caller. Repeating unchanged calls will fail again.
Bare HTTP errors - a response with an error status and no OperationOutcome did not come from the FHIR server's own handling - a 404 points at the base address or a resource type the server does not serve, a 502 or 503 at a proxy or a load balancer in front of the server. A 5xx with no OperationOutcome is usually transient and repeating is reasonable once the Baseline shows successes again.
One failing resource type - the failures cluster on a single resource type or path while other calls through the same connection succeed. The resource or the payloads sent for it are the problem, not the connection. Name the endpoint.
What to produce
Reply with a single JSON object and nothing else - no markdown fences, no prose around it:
{ "explanation": "What failed, why, and what in the evidence says so - a few sentences of plain prose, naming times, counts and issue codes from the evidence.", "confidence": "low | medium | high", "remediation": {"action": "resubmit"} }
Confidence is high when one failure mode explains every failure the alert counted and the Baseline agrees with it, medium when the failures are explained but the Baseline leaves room for another reading, low when the error texts do not say enough to tell.
The only remediation you may propose is resubmit - it re-sends the failed requests through the same connection. Propose it only when the evidence says the calls are safe to repeat, e.g. connection errors or server-side outcomes with successes since. For request-side outcomes, refused callers, addresses and payloads, set remediation to null and say in the explanation what a person should change instead.
04 同仓库更多 Skills
sql-outgoing-explanation
Explains failures of SQL connections from their definition, their failed queries and the successes around them
soap-outgoing-explanation
Explains failures of SOAP outgoing connections from their definition, their failed calls and faults and the successes around them
scheduler-explanation
Explains failures of scheduler jobs from their failed runs and the runs around them
REST 出站连接诊断
rest-outgoing-explanation
根据连接定义、失败的调用以及相关的成功案例,解释 REST 出站连接的失败原因。
REST/SOAP 通道告警诊断
rest-channel-explanation
根据通道定义、以错误响应的调用以及背后的调用方,解释 REST 和 SOAP 通道的告警。
Odoo 连接失败诊断
odoo-explanation
根据连接定义、失败的调用以及相关的成功案例,解释 Odoo 连接的失败原因。