Moved here from gandalf#47. Under the ownership split (see the README), this is host health observed from outside the host, so it belongs to thor rather than Gandalf.
Problem
A host that crashes, resets on its watchdog, or loses power, and is back within a few minutes, never gets reported. Gandalf only tickets a host that stays gone for host_failure_threshold checks (about 10 minutes). Anything that recovers inside that window leaves no trace beyond a closed event.
How to detect it
These two signals were checked against the last month of data:
A reboot happened:node_boot_time_seconds changes. Only visible once the host is back.
Nobody asked for it: no systemd-logind shutdown request (The system will reboot now!, power off now!) for that host in Loki shortly before it went quiet. The query is: {host="<host>", job="journal", unit="systemd-logind.service"} |~ "will (reboot|power off|halt|kexec) now"
Both signals together mean an unexpected reboot. A supporting sign is a chatty journal that stops mid-activity with no "Stopping ..." lines. Read the comment below on maintenance windows and log-shipping gaps before relying on this.
What Gandalf already has: gandalf#65 added reboots.py, which provides the Loki client, find_shutdown(loki, host, missing_for_s) and the grace helper. It was written so thor can lift it unchanged.
Real examples (UTC)
When
Host
Shape
2026-11-21 ~03:22
compute-storage-02
Journal stops on routine lines, boot at 03:24, no logind line. A known failing DIMM, already tracked in Tinker 693930698. Use it as test data only: no new tickets. If anything, add notes to that ticket.
2026-11-25 ~03:25
storage-01
Part of the operator's planned rack maintenance: the UPS firmware update was known to cut rack power. Journal stops at 03:24:59, boot 03:26, no logind line. See the comment below.
2026-11-06 23:17:49
micro1 (now monitor-01)
Counter-example: a planned reboot. The logind line arrived about 10 s before up went to 0.
Open questions
Priority: P3 seems right, since the host recovered.
Several hosts down at once: several hosts rebooting unexpectedly together points to power or maintenance, not each host. Group them into one ticket per root cause.
Known faults: a known, already-ticketed fault like compute-storage-02's DIMM should add a note to its existing ticket (693930698), not open new ones. How should a known condition be recorded and matched?
Lost lines: answered in the comment below. Yes, a shutdown line can be lost when the network path to Loki is down.
Moved here from gandalf#47. Under the ownership split (see the README), this is host health observed from outside the host, so it belongs to thor rather than Gandalf.
## Problem
A host that crashes, resets on its watchdog, or loses power, and is back within a few minutes, never gets reported. Gandalf only tickets a host that stays gone for `host_failure_threshold` checks (about 10 minutes). Anything that recovers inside that window leaves no trace beyond a closed event.
## How to detect it
These two signals were checked against the last month of data:
1. **A reboot happened:** `node_boot_time_seconds` changes. Only visible once the host is back.
2. **Nobody asked for it:** no `systemd-logind` shutdown request (`The system will reboot now!`, `power off now!`) for that host in Loki shortly before it went quiet. The query is:
`{host="<host>", job="journal", unit="systemd-logind.service"} |~ "will (reboot|power off|halt|kexec) now"`
Both signals together mean an unexpected reboot. A supporting sign is a chatty journal that stops mid-activity with no "Stopping ..." lines. Read the comment below on maintenance windows and log-shipping gaps before relying on this.
**What Gandalf already has:** gandalf#65 added `reboots.py`, which provides the Loki client, `find_shutdown(loki, host, missing_for_s)` and the grace helper. It was written so thor can lift it unchanged.
## Real examples (UTC)
| When | Host | Shape |
|---|---|---|
| 2026-11-21 ~03:22 | compute-storage-02 | Journal stops on routine lines, boot at 03:24, no logind line. A known failing DIMM, already tracked in Tinker [693930698](https://t.lotusguild.org/ticket/693930698). Use it as test data only: no new tickets. If anything, add notes to that ticket. |
| 2026-11-25 ~03:25 | storage-01 | Part of the operator's planned rack maintenance: the UPS firmware update was known to cut rack power. Journal stops at 03:24:59, boot 03:26, no logind line. See the comment below. |
| 2026-11-06 23:17:49 | micro1 (now monitor-01) | Counter-example: a planned reboot. The logind line arrived about 10 s before `up` went to 0. |
## Open questions
- **Priority:** P3 seems right, since the host recovered.
- **Several hosts down at once:** several hosts rebooting unexpectedly together points to power or maintenance, not each host. Group them into one ticket per root cause.
- **Known faults:** a known, already-ticketed fault like compute-storage-02's DIMM should add a note to its existing ticket (693930698), not open new ones. How should a known condition be recorded and matched?
- **Lost lines:** answered in the comment below. Yes, a shutdown line can be lost when the network path to Loki is down.
Planning only, like the rest of thor (#1).
The 11-25 example is a planned maintenance window, not a crash pattern.
The operator's sequence on the evening of 2026-11-24 was:
Silenced all of Gandalf.
Paused Ceph reads and writes.
Started host shutdowns.
Updated the UniFi switch firmware.
Updated the UPS firmware, knowing beforehand that the update would cut power to the rack.
The power cut was planned and expected.
What the data shows, matched to that sequence (UTC, 2026-11-25):
About 03:11: the switches went down for their update. monitor-01, monitor-02 and compute-storage-gpu-01 lost the network and stopped shipping journal lines. Loki has nothing more from them until they booted.
03:21:35: compute-storage-01 and compute-storage-02 logged a clean The system will power off now! from the operator's shutdowns. Their lines reached Loki, so the network path was partly back by then.
About 03:25 to 03:32: the UPS update cut rack power, as intended, and every host in the rack came back with a new boot time. storage-01's journal stops mid-activity at 03:24:59.
So "no logind line" was technically correct: those hosts lost power without a clean shutdown. What makes them not worth a ticket is that the operator planned it.
What this means for thor:
Respect maintenance. A silence or suppression, a Ceph pause or noout flag, or a UniFi or UPS firmware update in progress means the reboots inside that window should be summarised, not ticketed one by one. Ceph's flags are a strong, machine-readable maintenance signal. noout can also be set long-term on purpose, as it is now for compute-storage-02, so on its own it isn't proof of a window.
Check log shipping before calling a crash. A journal can stop reaching Loki minutes before the host goes down, for example when the switches it ships through reboot. When the journal went quiet before the host did, treat it as "unknown", not "crash".
Group simultaneous reboots. Many hosts rebooting together is one event (power or maintenance), never one ticket per host.
Lost lines: yes, shutdown lines can be lost, if the network path to Loki is down when they're written.
Gandalf's own use (gandalf#65) fails safe here. With no logind line, a missing host is alerted exactly as before, and that night the operator's silence covered it.
**The 11-25 example is a planned maintenance window, not a crash pattern.**
The operator's sequence on the evening of 2026-11-24 was:
1. Silenced all of Gandalf.
2. Paused Ceph reads and writes.
3. Started host shutdowns.
4. Updated the UniFi switch firmware.
5. Updated the UPS firmware, knowing beforehand that the update would cut power to the rack.
The power cut was planned and expected.
**What the data shows, matched to that sequence (UTC, 2026-11-25):**
- **About 03:11:** the switches went down for their update. monitor-01, monitor-02 and compute-storage-gpu-01 lost the network and stopped shipping journal lines. Loki has nothing more from them until they booted.
- **03:21:35:** compute-storage-01 and compute-storage-02 logged a clean `The system will power off now!` from the operator's shutdowns. Their lines reached Loki, so the network path was partly back by then.
- **About 03:25 to 03:32:** the UPS update cut rack power, as intended, and every host in the rack came back with a new boot time. storage-01's journal stops mid-activity at 03:24:59.
So "no logind line" was technically correct: those hosts lost power without a clean shutdown. What makes them not worth a ticket is that the operator planned it.
**What this means for thor:**
- **Respect maintenance.** A silence or suppression, a Ceph `pause` or `noout` flag, or a UniFi or UPS firmware update in progress means the reboots inside that window should be summarised, not ticketed one by one. Ceph's flags are a strong, machine-readable maintenance signal. `noout` can also be set long-term on purpose, as it is now for compute-storage-02, so on its own it isn't proof of a window.
- **Check log shipping before calling a crash.** A journal can stop reaching Loki minutes before the host goes down, for example when the switches it ships through reboot. When the journal went quiet before the host did, treat it as "unknown", not "crash".
- **Group simultaneous reboots.** Many hosts rebooting together is one event (power or maintenance), never one ticket per host.
- **Lost lines:** yes, shutdown lines can be lost, if the network path to Loki is down when they're written.
Gandalf's own use (gandalf#65) fails safe here. With no logind line, a missing host is alerted exactly as before, and that night the operator's silence covered it.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Moved here from gandalf#47. Under the ownership split (see the README), this is host health observed from outside the host, so it belongs to thor rather than Gandalf.
Problem
A host that crashes, resets on its watchdog, or loses power, and is back within a few minutes, never gets reported. Gandalf only tickets a host that stays gone for
host_failure_thresholdchecks (about 10 minutes). Anything that recovers inside that window leaves no trace beyond a closed event.How to detect it
These two signals were checked against the last month of data:
node_boot_time_secondschanges. Only visible once the host is back.systemd-logindshutdown request (The system will reboot now!,power off now!) for that host in Loki shortly before it went quiet. The query is:{host="<host>", job="journal", unit="systemd-logind.service"} |~ "will (reboot|power off|halt|kexec) now"Both signals together mean an unexpected reboot. A supporting sign is a chatty journal that stops mid-activity with no "Stopping ..." lines. Read the comment below on maintenance windows and log-shipping gaps before relying on this.
What Gandalf already has: gandalf#65 added
reboots.py, which provides the Loki client,find_shutdown(loki, host, missing_for_s)and the grace helper. It was written so thor can lift it unchanged.Real examples (UTC)
upwent to 0.Open questions
Planning only, like the rest of thor (#1).
The 11-25 example is a planned maintenance window, not a crash pattern.
The operator's sequence on the evening of 2026-11-24 was:
The power cut was planned and expected.
What the data shows, matched to that sequence (UTC, 2026-11-25):
The system will power off now!from the operator's shutdowns. Their lines reached Loki, so the network path was partly back by then.So "no logind line" was technically correct: those hosts lost power without a clean shutdown. What makes them not worth a ticket is that the operator planned it.
What this means for thor:
pauseornooutflag, or a UniFi or UPS firmware update in progress means the reboots inside that window should be summarised, not ticketed one by one. Ceph's flags are a strong, machine-readable maintenance signal.nooutcan also be set long-term on purpose, as it is now for compute-storage-02, so on its own it isn't proof of a window.Gandalf's own use (gandalf#65) fails safe here. With no logind line, a missing host is alerted exactly as before, and that night the operator's silence covered it.