Deploy the keyword archiver: shim, config, systemd instance and a secrets file - #216
Merged
Merged
Conversation
mikelangmayr
force-pushed
the
mike/keygrabber-deployment
branch
from
September 18, 2026 20:36
2af36cb to
ae695ae
Compare
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.
Deploys libby's keygrabber on the HISPEC host. It records the other daemons' keywords into InfluxDB so Grafana has something to draw; it drives no hardware and owns no device.
daemons/generic/keygrabber, a four-line shim. The daemon itself lives in libby, since nothing about it is instrument-specific, but the unit template runsdaemons/<subdir>/<script>, so it needs a file here to be launched like any other instanceconfig/hispec/hispec_keygrabber.yamlcovering all 25 deployed peers, including the three Xeryon instances from Add a Xeryon motion daemon for the FAMs and the PIAA deploy stages #217, grouped by how fast they actually change: motion at 5s, filter wheels and thermal at 30s, cryo and vacuum at 60s. That is 158 requests per minute across the fleet, one per peer per tickkeywords: ["%"]rather than a hand-listed set. Patterns resolve against the live peer, so this needs no per-daemon keyword knowledge and picks up keywords as daemons gain them. Narrowing later is a config edit pluslibby modify hispec.keygrabber.reload=1systemd/instances/hispec_keygrabber.env/etc/hispec/secrets.env, created byinstall.shat 0600 root:root and read by every unit via an optional secondEnvironmentFile./etc/hispec/instances/*.envis mode 2775 and group-readable by everyhispec-opsmember, which is correct for configs and wrong for a database write token. systemd reads the file as root before dropping toUser=hispec, so it never needs to be readable by anyone elselibby[influxdb], since this repo now ships a daemon that needs itsystemd/README.md: where secrets go, and the archiver's two extra deployment steps, plus that pausing it needs no restart. Note the keygrabber in the README structure table as the one daemon that drives no hardwareVerified against merged libby rather than by eye: the config parses through the real
parse_config, all 25 collections satisfy the interval-versus-timeout rule, every referenced peer has a config tracked on main and every deployed peer is covered by a collection, and the default exclusions dropuptimeandlasterrorwhile keepingerror. The shim runs, and a live run against a real peer collected samples and answered its control keywords over the wire.That live run also found two libby bugs, both since fixed and merged in CaltechOpticalObservatories/libby#37:
isconnectedreported healthy while every write failed, and a failing collection logged an error every interval with no backoff.