Repository navigation
Add a disconnected PVs report - #58
Merged
Merged
Conversation
Add /disconnected-pvs, linked from the overview page, a report for people such as IOC maintainers of the PVs /healthcheck lists. It shows each PV with the clients that monitor it, a WEDM screen by its EDL file and linked to the screen, and groups the PVs by client and by IOC. The IOC comes from the MYA archiver: the browser looks each PV up with myquery's channel search, at MYQUERY_URL (default /myquery, on the same host) in MYQUERY_DEPLOYMENT (default ops); an empty MYQUERY_URL turns the lookup off. A PV's IOC can't come from CA once it's disconnected, and epics2web usually reaches IOCs through gateways, so the report also shows the server each PV was last reached through, which ChannelMonitor now records on connect. The healthcheck's selection of PVs moves to UnhealthyPvs, so both pages list the same PVs; the healthcheck now lists them by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017sRPCQkg9smoVJvSLJDQXb
slominskir
approved these changes
Oct 5, 2026
This was referenced Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
A new page,
/disconnected-pvs, linked from the overview page under "Reports". It's for people such as IOC maintainers. It lists the same PVs as/healthcheck: PVs disconnected or never connected for longer thanHEALTHCHECK_GRACE_SECONDS, plus frozen PVs. For each PV it shows:clientName, IP).epics2web.jssends the page address asclientNameby default, and WEDM doesn't override it. So a WEDM screen is shown by itsedlvalue and linked to the screen. Sessions with the same name are grouped (×N). Onlyhttp/httpsnames become links, and all output is escaped.GET /channel?q=<pv>&l=50&m=<deployment>.qis a SQLLIKEpattern, so only the exact name match is kept. The IOC column fills in after the page loads, with four lookups at a time.active=falseshows as "no longer archived". PVs with no IOC are grouped as "Not archived", "Archived without an IOC" or "Lookup failed".ChannelMonitornow recordschannel.getTransport().getRemoteAddress()on each connect. This runs on thecallbackExecutor, not inside a CAJ callback. The report shows it as host:port, with reverse DNS cached inServerNames.The page has four sections: Summary counts, By IOC (built in JS once the lookups finish), By Client, and PVs.
The healthcheck's PV selection moves to
UnhealthyPvs, so both pages list the same PVs./healthchecknow lists them sorted by name instead of in HashMap order. Its JSON fields and status codes are otherwise unchanged.New settings (in the README under Healthcheck → "Disconnected PVs report")
MYQUERY_URL/myqueryMYQUERY_DEPLOYMENTopsm).Deployment
None if the defaults suit the ops fiefdom. Question for the reviewer: should other fiefdoms (chl, srf, …) set
MYQUERY_DEPLOYMENT, if their PVs are archived in another MYA deployment?Checks
./gradlew spotlessCheck test: passed, 81 unit tests (19 of them new:UnhealthyPvsTest,ClientLabelTest,DisconnectedPvReportTest, plus additions toApplicationTest)../gradlew integrationTest: passed, 25 tests (22 existing + 3 new). The image was built with the repoDockerfile(docker compose -f build.yaml build --build-arg CUSTOM_CRT_URL=). The newDisconnectedPvsTestchecks three things:clientNameis shown and linked by its EDL, and a hostile name is escapedsoftioclistschannel1with a…:5064ViaMYQUERY_URL=""Not verified
iocvalues look likescreen.js).Decisions
fmt:formatDate. JSTL falls back toDate.toString()when a request has no Accept-Language, and the JS compares the time strings to find the earliest.disconnected-pvs.js, tried when the first finds nothing.🤖 Generated with Claude Code
https://claude.ai/code/session_017sRPCQkg9smoVJvSLJDQXb