shadcn.io is not affiliated with official shadcn/ui
Server Health Units Monitoring Block for Svelte
The eight systemd units of one of three hosts with state, restarts, memory, uptime and last log line, a failed unit that opens to six copyable journal lines and a Recheck units button that moves the typed readings one round.
Installation
Overview
Check what the init system thinks of a host with this health list for Svelte with Ark UI. It is Stethodeck, a server health agent, and the header is worked out from the readings: "app-eu-1 has been up 366 days; 1 of 8 units has failed". A native select picks one of three hosts. In a hairline frame with a plus mark on each corner, eight units are rows with a state word and glyph (Active, Activating or Failed), restarts in 24 hours, memory, how long each has been up and its last log line. A failed unit opens in place to its last six journal lines in a monospace block with a Copy lines button. The Shine Button Recheck units runs a short simulated check and moves every unit one round on: a failed unit may start again, another may stay failed, and the status line says what changed and that nothing was probed. Guides draw the frame and its bands; the entrance is CSS only. For status pages, runbooks and any host with services that restart themselves.
FAQ
How do I load my own units?
Each host is a list of lines: name|memory MB|restarts in 24 h|since|state=log~state=log. The part after the last bar holds one reading per recheck (A active, S activating, F failed); the last reading repeats once the rechecks run out. Journals are lines in JOURNAL_LINES keyed host/unit; a unit with a journal gets the open-in-place row. The header, the counts, the uptime text and the change line are worked out from the readings and AS_OF.
What does Recheck units do?
It waits 700 ms, then moves the readings to the next round (two rounds at most) and the check time on by a minute. Nothing is probed or restarted: the rounds are typed, which is how one unit recovers while another stays failed. A reload puts the first round back. In your app call your agent, then replace the readings with its answer.
What does Copy lines copy?
The six journal lines of that unit as plain text, through the browser's clipboard, and the status line says how many. If the clipboard is not available it still reports the action without copying.