diff --git a/README.md b/README.md index ecd19e18..bf690ae3 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ documents for different readers. can't run an agent (firewall, switch, UPS, iLO). One agent config, deployed identically everywhere. [How](docs/architecture.md#observability-data-flow) - **Dashboards and alerting as code.** 8 provisioned dashboards, 156 panels, and - 210 alert rules — 182 metric-based in Prometheus, 28 log-based in Loki — sharing + 211 alert rules — 183 metric-based in Prometheus, 28 log-based in Loki — sharing one Alertmanager routing tree. No dashboard exists only in a database. - **Secrets encrypted in-repo with SOPS + age.** Per-device credentials, decrypted at deploy time into gitignored paths, with `git log` showing which @@ -207,7 +207,7 @@ inbound passes may still reach it. Data flow and the maintained Mermaid topology . ├── stacks/ │ ├── observability/ # the estate's stack on prometheus — ten services -│ │ ├── prometheus/ # config, file_sd targets, 182 alert rules +│ │ ├── prometheus/ # config, file_sd targets, 183 alert rules │ │ ├── alertmanager/ # routing and inhibition │ │ ├── loki/ # single-binary config + 28 LogQL rules │ │ ├── alloy/ # the agent config directory, shipped to every host diff --git a/docs/changelog.md b/docs/changelog.md index 333de2db..6b5eeeb8 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -382,6 +382,16 @@ docstring gives: it is a record, not a claim about now. steps, which end by switching its probe to `http_2xx_lab_ca`. The card still serves its factory certificate until those steps are run. +- **A CPU near its critical temperature now alerts.** `HostCpuHot`, a + warning in `host.rules.yaml`, fires when a host's hottest coretemp core has + held within 10 °C of that core's own critical point for ten minutes. Before + it, nothing read `node_hwmon_temp_celsius`. The audit of `prometheus` of + 2026-11-13 watched the laptop peak at 92 °C against 105 (finding 10), and a + failed fan would have shown only as `InstanceDown` after the shutdown. The + margin is measured: over 29 days, no host held within 22 °C of critical for + ten minutes, and prometheus's brief peaks came within 13. Other chips are left + out, because smaug's DIMM sensors report a critical point of 0 °C. + ## 2026-11-23 - **NUT's driver on `morpheus` retries for 14 seconds, not 6.** The *data diff --git a/docs/observability.md b/docs/observability.md index 7d8937eb..2f12496e 100644 --- a/docs/observability.md +++ b/docs/observability.md @@ -352,7 +352,7 @@ separates a quiet stream from a stopped one. ## Alerting -210 rules in total: 182 metric-based in `prometheus/rules/`, and 28 log-based in +211 rules in total: 183 metric-based in `prometheus/rules/`, and 28 log-based in `loki/rules/`. ### Log-based (Loki ruler) @@ -550,11 +550,11 @@ argument and for what to do when it exits 1. ### Metric-based (Prometheus) -182 rules across 13 files in `prometheus/rules/`: +183 rules across 13 files in `prometheus/rules/`: | File | Covers | | --- | --- | -| `host.rules.yaml` | Instance down, predictive disk fill, memory, load, clock skew and a clock with no time source at all — `HostClockUnsynchronised` reads `node_timex_sync_status`, because the offset reads zero once timesyncd has restored a clock that is wrong but stable, which is how a cleared RTC wrote fourteen minutes of samples three hours in the past and nothing noticed ([#519](https://github.com/Gerrrt/HomeLab/issues/519)) — reboots, and, for the two laptops, whether the shelf is on mains, whether the cell that carries them through a cut is still worth relying on ([#454](https://github.com/Gerrrt/HomeLab/issues/454), and [`runbooks/replace-the-laptop-cell.md`](runbooks/replace-the-laptop-cell.md) for the swap), how hot that cell is, whether its temperature is being measured at all — on 2026-09-19 it was not, on either host — and how many minutes the host has left once the cut arrives ([#532](https://github.com/Gerrrt/HomeLab/issues/532)); whether the wiki's drift check on `oracle` is still running, and still able to read its claims ([#470](https://github.com/Gerrrt/HomeLab/issues/470), [#1531](https://github.com/Gerrrt/HomeLab/issues/1531)); and, for the NAS, whether every ZFS pool is online — `ZpoolNotOnline` reads `node_zfs_zpool_state`, added after `erebor` lost a disk on 2026-09-19 with the exporter hung ahead of it and `InstanceDown` the only page ([#558](https://github.com/Gerrrt/HomeLab/issues/558), [`runbooks/replace-the-nas-disk.md`](runbooks/replace-the-nas-disk.md)); and whether any drive's unsafe-shutdown count has grown in a day — `SmartDriveUnsafeShutdownsGrowing`, whose page says when `smaug` recorded a clean power-off the same day, because mains removed after a clean shutdown ticks the S3520 and a clean shutdown alone does not ([#746](https://github.com/Gerrrt/HomeLab/issues/746)), the measure of a cut the shutdown sequence [ADR-0049](adr/0049-shut-down-on-the-ups-from-a-nut-server-on-the-firewall.md) decides did not catch, the rule [ADR-0047](adr/0047-collect-smaug-smart-through-a-root-cron-and-the-textfile-collector.md) left to that issue when it carried `smaug`'s counter under the scrape ([#574](https://github.com/Gerrrt/HomeLab/issues/574)); and, for `Saruman`, how full its LVM-thin pools are — which `node_filesystem_*` cannot see — and whether its Proxmox firewall is still on with an inbound policy that drops, from two agent collectors ([#538](https://github.com/Gerrrt/HomeLab/issues/538), [#576](https://github.com/Gerrrt/HomeLab/issues/576)); and whether the `tc` mirror that feeds Zeek on `fenrir` is still delivering packets from every port of the lab bridge — `ZeekMirrorInactive`, Zeek's absence detection answered on the hypervisor because the lab's Loki has no ruler ([#437](https://github.com/Gerrrt/HomeLab/issues/437), [ADR-0068](adr/0068-mirror-the-lab-bridge-to-zeek-with-tc-not-open-vswitch.md)); and whether a guest the hypervisor tags `disposable` has outlived the fortnight it was built for — `DisposableGuestOutlived`, read from each guest's own `qm config` rather than from any list of which guests should exist, which is also why `HypervisorGuestStopped` stays quiet for such a guest, with `GuestConfigUnreadable` covering the read itself failing ([#438](https://github.com/Gerrrt/HomeLab/issues/438), [ADR-0071](adr/0071-run-disposable-investigations-on-a-guest-that-is-destroyed.md)); and a guest tagged `backup` that no enabled backup job selects, as `GuestNotInBackupJob`, after the domain's six fell out of `golem-nightly` through purged tofu destroys (2026-10-10); and how many days the four management consoles' certificates have left — the pfSense GUI, the iLO, `Saruman`'s `:8006` and the TrueNAS UI, none of which the blackbox exporter can reach — `ManagementCertificateExpiringSoon` at 30 days and `ManagementCertificateExpiryImminent` at 7, read from a handshake made inside each console's own segment, with `ManagementCertificateUnchecked` for a console that would not answer and `CertExpiryStateStale` for a collector that stopped ([#857](https://github.com/Gerrrt/HomeLab/issues/857), [ADR-0084](adr/0084-read-management-certificate-expiry-from-inside-each-segment.md)) | +| `host.rules.yaml` | Instance down, predictive disk fill, memory, load, clock skew and a clock with no time source at all — `HostClockUnsynchronised` reads `node_timex_sync_status`, because the offset reads zero once timesyncd has restored a clock that is wrong but stable, which is how a cleared RTC wrote fourteen minutes of samples three hours in the past and nothing noticed ([#519](https://github.com/Gerrrt/HomeLab/issues/519)) — reboots, whether a CPU has held within ten degrees of its own critical temperature for ten minutes (`HostCpuHot`, after the audit of `prometheus` of 2026-11-13 found the laptop peaking at 92 °C with nothing watching it), and, for the two laptops, whether the shelf is on mains, whether the cell that carries them through a cut is still worth relying on ([#454](https://github.com/Gerrrt/HomeLab/issues/454), and [`runbooks/replace-the-laptop-cell.md`](runbooks/replace-the-laptop-cell.md) for the swap), how hot that cell is, whether its temperature is being measured at all — on 2026-09-19 it was not, on either host — and how many minutes the host has left once the cut arrives ([#532](https://github.com/Gerrrt/HomeLab/issues/532)); whether the wiki's drift check on `oracle` is still running, and still able to read its claims ([#470](https://github.com/Gerrrt/HomeLab/issues/470), [#1531](https://github.com/Gerrrt/HomeLab/issues/1531)); and, for the NAS, whether every ZFS pool is online — `ZpoolNotOnline` reads `node_zfs_zpool_state`, added after `erebor` lost a disk on 2026-09-19 with the exporter hung ahead of it and `InstanceDown` the only page ([#558](https://github.com/Gerrrt/HomeLab/issues/558), [`runbooks/replace-the-nas-disk.md`](runbooks/replace-the-nas-disk.md)); and whether any drive's unsafe-shutdown count has grown in a day — `SmartDriveUnsafeShutdownsGrowing`, whose page says when `smaug` recorded a clean power-off the same day, because mains removed after a clean shutdown ticks the S3520 and a clean shutdown alone does not ([#746](https://github.com/Gerrrt/HomeLab/issues/746)), the measure of a cut the shutdown sequence [ADR-0049](adr/0049-shut-down-on-the-ups-from-a-nut-server-on-the-firewall.md) decides did not catch, the rule [ADR-0047](adr/0047-collect-smaug-smart-through-a-root-cron-and-the-textfile-collector.md) left to that issue when it carried `smaug`'s counter under the scrape ([#574](https://github.com/Gerrrt/HomeLab/issues/574)); and, for `Saruman`, how full its LVM-thin pools are — which `node_filesystem_*` cannot see — and whether its Proxmox firewall is still on with an inbound policy that drops, from two agent collectors ([#538](https://github.com/Gerrrt/HomeLab/issues/538), [#576](https://github.com/Gerrrt/HomeLab/issues/576)); and whether the `tc` mirror that feeds Zeek on `fenrir` is still delivering packets from every port of the lab bridge — `ZeekMirrorInactive`, Zeek's absence detection answered on the hypervisor because the lab's Loki has no ruler ([#437](https://github.com/Gerrrt/HomeLab/issues/437), [ADR-0068](adr/0068-mirror-the-lab-bridge-to-zeek-with-tc-not-open-vswitch.md)); and whether a guest the hypervisor tags `disposable` has outlived the fortnight it was built for — `DisposableGuestOutlived`, read from each guest's own `qm config` rather than from any list of which guests should exist, which is also why `HypervisorGuestStopped` stays quiet for such a guest, with `GuestConfigUnreadable` covering the read itself failing ([#438](https://github.com/Gerrrt/HomeLab/issues/438), [ADR-0071](adr/0071-run-disposable-investigations-on-a-guest-that-is-destroyed.md)); and a guest tagged `backup` that no enabled backup job selects, as `GuestNotInBackupJob`, after the domain's six fell out of `golem-nightly` through purged tofu destroys (2026-10-10); and how many days the four management consoles' certificates have left — the pfSense GUI, the iLO, `Saruman`'s `:8006` and the TrueNAS UI, none of which the blackbox exporter can reach — `ManagementCertificateExpiringSoon` at 30 days and `ManagementCertificateExpiryImminent` at 7, read from a handshake made inside each console's own segment, with `ManagementCertificateUnchecked` for a console that would not answer and `CertExpiryStateStale` for a collector that stopped ([#857](https://github.com/Gerrrt/HomeLab/issues/857), [ADR-0084](adr/0084-read-management-certificate-expiry-from-inside-each-segment.md)) | | `network.rules.yaml` | SNMP reachability, pf not running, state table, switch links, a switch port whose VLAN changed (`SwitchPortVlanChanged`, from `dot1qPvid`, [#1387](https://github.com/Gerrrt/HomeLab/issues/1387)), iLO hardware and Smart Array cache. `shiva`'s Smart Storage Battery read failed from 2026-08-18 until it was replaced on 2026-09-02, with the array in write-through as a result, so stored metrics before that date show the failed pack — `IloBatteryCondition` names the spare part to order, and the controller rollups are deliberately read at *failed* rather than *degraded* ([#76](https://github.com/Gerrrt/HomeLab/issues/76)). Also whether the remote path's dynamic DNS name still resolves to the WAN address — `DdnsRecordStale` and `DdnsRecordUnchecked`, from the comparison `scripts/collect-gateway-state.sh` makes on the firewall every fifteen minutes ([#604](https://github.com/Gerrrt/HomeLab/issues/604), [ADR-0044](adr/0044-answer-the-endpoint-with-dynamic-dns-from-morpheus.md)); see *What the dynamic DNS series disclose* below | | `ups.rules.yaml` | On battery, low battery, runtime, load, temperature, and whether the shutdown order has time to run: `UpsLowBatteryDurationShort` when the card's low-battery duration is under the 16 minutes [ADR-0107](adr/0107-subscribe-trinity-to-the-ups-and-bound-saruman-s-guest-stop.md) needs, `UpsRideThroughShort` when a charged pack on mains would start the halt under 15 minutes into a cut. Five rules read the AP9335T rack-ambient probe on the card: `UpsTemperatureProbeMissing`, `UpsTemperatureProbeCommsLost`, `RackAmbientTemperatureAlarm` on the card's own limits, and the fixed ones, `RackAmbientTemperatureHigh` over 30 °C and `RackAmbientTemperatureCritical` over 35 °C. The card reports whole degrees, not the tenths PowerNet-MIB describes. A pack was fitted on 2026-08-28 and passed its self-test, so these read real hardware; stored metrics older than that date are the card's fabricated values — see [`runbooks/fit-the-ups-battery.md`](runbooks/fit-the-ups-battery.md) | | `containers.rules.yaml` | Restart loops, OOM kills, memory, throttling | @@ -587,7 +587,7 @@ as loaded and healthy and could not fire for any input ([#63](https://github.com `prometheus/tests/*.test.yaml` holds `promtool test rules` unit tests, which feed a rule synthetic series and assert it fires — paired with a case asserting it stays quiet, because a test that only ever expects silence would have passed -against the broken rule too. Coverage is 182 rules of 182 so far ([#843](https://github.com/Gerrrt/HomeLab/issues/843)) — all twelve +against the broken rule too. Coverage is 183 rules of 183 so far ([#843](https://github.com/Gerrrt/HomeLab/issues/843)) — all twelve in `blackbox.rules.yaml`, all three in `dns.rules.yaml`, all seven in `range.rules.yaml`, `GatewayFilesystemCritical`, `ContainerHighMemory`, `ContainerNearMemoryLimit`, `ContainerRestartLoop`, `ContainerCpuThrottled`, the three container-state rules from diff --git a/docs/runbooks/deploy-stack.md b/docs/runbooks/deploy-stack.md index 90ba0dfb..a988b6f4 100644 --- a/docs/runbooks/deploy-stack.md +++ b/docs/runbooks/deploy-stack.md @@ -151,7 +151,7 @@ Then in the UI: 1. **Prometheus → Status → Targets.** Every job `UP`. The four `snmp` targets take up to 45 seconds on their first scrape. 2. **Prometheus → Status → Rules.** Every rule loaded, none in error. The - page lists 188: the 182 alert rules this repository counts everywhere + page lists 189: the 183 alert rules this repository counts everywhere else, plus the six recording rules: `homelab_suricata_expected_interface`, `homelab_battery_runtime_seconds`, and the two directions each of diff --git a/docs/security.md b/docs/security.md index 2d17aa62..378fce5c 100644 --- a/docs/security.md +++ b/docs/security.md @@ -35,7 +35,7 @@ What this network is actually built to survive: | Someone on Winterfell or Hicks logging in to `prometheus` | **Key-only `sshd` since 2026-11-23; no host firewall by decision.** `prometheus` holds the estate's CA key and the age key that opens every volume backup set, and converge runs as the operator, who is in `sudo` and `docker`. Its `sshd` answers all of Hicks (by `morpheus`'s pass for `22` to the segment) and every host on VLAN 99. The audit's root-only reads on 2026-11-23 found it taking passwords, with X11 forwarding on and `ufw` inactive. [ADR-0128](adr/0128-give-prometheus-a-key-only-sshd-and-no-host-firewall.md) makes `sshd` key-only through a drop-in that outranks cloud-init's, refusing root and X11 forwarding ([`restore-the-stack.md`](runbooks/restore-the-stack.md#make-sshd-key-only)). It adds no host firewall, because Docker's rules run ahead of `ufw`'s for the published ports, so a policy would cover `22` alone. Those ports stay fenced as before: by `morpheus` by destination, by the ingest proxy's tokens on `9090` and `3100`, and on `6514` by the syslog listener's pinned client certificate and its sender list. The step was applied the same day. `sshd -T` read `no` for all four settings, a password login and a keyboard-interactive login were each refused with `Permission denied (publickey)`, and a key login from Hicks succeeded after the reload. | | Someone on Hicks or Winterfell logging in to `smaug` | **Key-only `sshd` since 2026-11-24.** `smaug` holds the household's media and the `erebor` pool. Two hosts reach its `22`, each by a host-scoped pass on `morpheus` ([`network.md`](network.md)): `prometheus`, as the read-only backup user `frodo`, and `desktop-02` on Hicks, as the administrator `gerrrt`. From 2026-11-13 `gerrrt` logged in by password, allowed both on the user and in the SSH service's *Password Login Groups*, while the documents said `frodo` was the only user. Both settings were cleared in the TrueNAS UI on 2026-11-24. `sshd_config` then had no `Match` block left, and a connection as `gerrrt` or `root` was offered `publickey` alone. | | Someone with the trusted Wi-Fi key quietly joining | Kea's lease log reaches Loki; `UnknownDeviceOnTrustedSegment` fires the first time a MAC appears on VLAN 50 in seven days ([ADR-0019](adr/0019-read-device-joins-from-the-dhcp-server.md)) | -| Losing visibility of a failure | 210 alert rules, 30 days of metrics and logs | +| Losing visibility of a failure | 211 alert rules, 30 days of metrics and logs | | Someone on a reachable VLAN silencing an alert to hide a failure | Alertmanager binds to `127.0.0.1`; silences go through authenticated Grafana | | Mains power loss | **The rack, yes; the monitoring path, yes — on two laptop cells that were measured for the first time on 2026-09-12.** A pack fitted to `mjolnir` on 2026-08-28 passed its self-test; the TP-Link carrying `prometheus` and `oracle` has been on UPS power since 2026-09-08 ([#110](https://github.com/Gerrrt/HomeLab/issues/110)); the laptops ride a cut out on their own batteries, which `HostBatteryHealthLow` in `host.rules.yaml` now reads — `prometheus`'s cell was replaced on 2026-09-18 and reads 101 % of design, `oracle`'s was replaced on 2026-09-29 and reads 100 %, its design figure rather than a learned one ([#531](https://github.com/Gerrrt/HomeLab/issues/531)) — and **each runtime was measured once: `prometheus`'s on 2026-09-19, about 2.5 hours from full at the stack's load, and `oracle`'s on 2026-09-29, about 5.2 hours**; since the same day the projection is recorded on every cut and pages under thirty minutes (`HostBatteryRuntimeLow`, [#532](https://github.com/Gerrrt/HomeLab/issues/532)), but neither pack reports a moving cell temperature, so this row is answered for both hosts' runtime and for neither's cell temperature — see below. **What happens when the cut outlasts the pack is configured and accepted without a live test.** Since 2026-09-23 the firewall's NUT server reads `mjolnir`, and `Saruman` and `smaug` subscribe to it on their own gateway addresses, so a real cut would now try to run the sequence [ADR-0049](adr/0049-shut-down-on-the-ups-from-a-nut-server-on-the-firewall.md) decides: `Saruman` and `smaug` halt first and `morpheus` last. Since the move into the 32U rack on 2026-11-06 the PDU also carries `trinity`, `gandalf` (off until its build) and the console, with `smaug` racked and on the PDU directly rather than by its old long cord to the media room. [ADR-0107](adr/0107-subscribe-trinity-to-the-ups-and-bound-saruman-s-guest-stop.md) makes `trinity` a third subscriber and bounds `Saruman`'s guest stop. `Saruman`'s half was applied on 2026-11-13 (`down=90` on the four ordered guests, and its monitor stays logged in until they are down); `trinity`'s subscription, `HOSTSYNC 600` on `morpheus` and the card's 16-minute threshold followed on 2026-11-20, so all three subscribers would now halt before the pack empties; `gandalf`, the console and `neo` are left to the pack by decision. The pack itself is unmeasured: about 47 minutes at 21 % load is the card's own estimate. Neither the forced-shutdown proof nor a mains pull will be run ([ADR-0121](adr/0121-accept-the-ups-shutdown-without-a-live-test.md)) | | The estate being down while the person who runs it is unavailable | **Documentation, yes; data, no copy outside the house, by decision.** ADR-0011 puts the emergency tier on paper; [ADR-0023](adr/0023-keep-the-household-recovery-path-outside-the-estate.md) extends the same reasoning to the sensitive tier's data. That tier has held real photographs since 2026-09-28. [ADR-0122](adr/0122-drop-the-household-copy.md) dropped their copy outside the estate, so a loss of the house loses them — see below | diff --git a/stacks/observability/README.md b/stacks/observability/README.md index 71f3d842..c3af378e 100644 --- a/stacks/observability/README.md +++ b/stacks/observability/README.md @@ -53,7 +53,7 @@ prometheus/ targets/snmp.yaml SNMP targets — hot-reloaded, no restart needed targets/node.yaml node_exporter scrapes, for the host that runs no Alloy (smaug) targets/blackbox*.yaml probe targets, http, dns and latency — hot-reloaded, no restart - rules/*.rules.yaml 182 alert rules: host, network, ups, containers, blackbox, + rules/*.rules.yaml 183 alert rules: host, network, ups, containers, blackbox, dns, backup, ids, deploy, stack, internet, watchdog and range tests/*.test.yaml promtool unit tests — assert the rules can fire blackbox/blackbox.yaml probe modules — reachability, and what a resolver said diff --git a/stacks/observability/prometheus/rules/host.rules.yaml b/stacks/observability/prometheus/rules/host.rules.yaml index 768b9fd8..c21c892b 100644 --- a/stacks/observability/prometheus/rules/host.rules.yaml +++ b/stacks/observability/prometheus/rules/host.rules.yaml @@ -2074,6 +2074,46 @@ groups: docs/runbooks/replace-the-laptop-cell.md §3 is the only check on a hot cell here. + - alert: HostCpuHot + # Nothing watched a CPU's temperature until the prometheus audit of + # 2026-11-13 found the laptop peaking at 92 °C (finding 10). A failed + # fan or a blocked vent would have shown only as InstanceDown, after + # the machine had shut itself off at its critical point. + # + # THE MARGIN IS MEASURED. coretemp exports its own critical point per + # core (105 °C on prometheus, 96 on Saruman, 100 elsewhere), so the + # rule reads each host against its own rather than one figure. Over + # 29 days of retention, the closest any host's CPU came to critical + # and held there for ten minutes was 22 °C, on prometheus during the + # audit's own heavy work; its brief peaks came within 13. Ten degrees + # for ten minutes is past both, and still before the CPU throttles + # hard and shuts down at critical. + # + # coretemp only. Other chips report a critical point that is not one: + # the DIMM sensors on smaug report a critical point of 0 °C, so + # every sample of theirs is 28 °C over it. heimdall, a Pi, has no coretemp, and an ARM board throttles + # itself well before it is a hazard. One alert per host, the hottest + # core, rather than one per core. + expr: >- + max by (instance, job) ( + node_hwmon_temp_celsius{chip=~"platform_coretemp_.*"} + >= on (instance, job, chip, sensor) + node_hwmon_temp_crit_celsius{chip=~"platform_coretemp_.*"} - 10 + ) + for: 10m + labels: + component: host + severity: warning + category: hardware + annotations: + summary: "{{ $labels.instance }}: CPU at {{ $value }} °C, within 10 °C of critical" + description: >- + A CPU core on {{ $labels.instance }} has been within 10 °C of its + own critical temperature for ten minutes. Heavy work alone has not + done that on any host here. Check the fan and the vents first, then + whatever is using the CPU; at the critical point the machine shuts + itself down. + - record: homelab_battery_runtime_seconds # Seconds the host has left on its cell at the draw it is presenting # right now, and only while it is on that cell. charge_ampere is what diff --git a/stacks/observability/prometheus/tests/host.test.yaml b/stacks/observability/prometheus/tests/host.test.yaml index 7cede341..a9ed988b 100644 --- a/stacks/observability/prometheus/tests/host.test.yaml +++ b/stacks/observability/prometheus/tests/host.test.yaml @@ -3484,6 +3484,73 @@ tests: alertname: HostBatteryNotReported exp_alerts: [] + # --- HostCpuHot: 96 °C against a 105 °C critical, held, fires ---------- + # 96 is inside the rule's ten degrees on prometheus, held from the first + # sample. Quiet at 5m and firing at 10m pins the hold to `for: 10m`: removing + # it fails the first check, lengthening it fails the second. Labels other + # than instance and job are aggregated away, so one host gives one alert + # however many cores are hot. + - interval: 1m + input_series: + - series: 'node_hwmon_temp_celsius{instance="prometheus",job="prometheus-metrics",chip="platform_coretemp_0",sensor="temp2"}' + values: "96x20" + - series: 'node_hwmon_temp_crit_celsius{instance="prometheus",job="prometheus-metrics",chip="platform_coretemp_0",sensor="temp2"}' + values: "105x20" + - series: 'node_hwmon_temp_celsius{instance="prometheus",job="prometheus-metrics",chip="platform_coretemp_0",sensor="temp3"}' + values: "97x20" + - series: 'node_hwmon_temp_crit_celsius{instance="prometheus",job="prometheus-metrics",chip="platform_coretemp_0",sensor="temp3"}' + values: "105x20" + alert_rule_test: + - eval_time: 5m + alertname: HostCpuHot + exp_alerts: [] + - eval_time: 10m + alertname: HostCpuHot + exp_alerts: + - exp_labels: + instance: prometheus + job: prometheus-metrics + component: host + severity: warning + category: hardware + exp_annotations: + summary: "prometheus: CPU at 97 °C, within 10 °C of critical" + description: >- + A CPU core on prometheus has been within 10 °C of its own + critical temperature for ten minutes. Heavy work alone has not + done that on any host here. Check the fan and the vents first, + then whatever is using the CPU; at the critical point the + machine shuts itself down. + + # --- HostCpuHot: the audit's 92 °C peak, for five minutes, does not ------- + # The hottest the laptop ran in the audit's heavy work: 92 °C, briefly. It is + # 13 under critical, so outside the ten degrees, and a spike that short would + # not outlast the ten minutes anyway. + - interval: 1m + input_series: + - series: 'node_hwmon_temp_celsius{instance="prometheus",job="prometheus-metrics",chip="platform_coretemp_0",sensor="temp2"}' + values: "70x5 92x5 70x10" + - series: 'node_hwmon_temp_crit_celsius{instance="prometheus",job="prometheus-metrics",chip="platform_coretemp_0",sensor="temp2"}' + values: "105x20" + alert_rule_test: + - eval_time: 15m + alertname: HostCpuHot + exp_alerts: [] + + # --- HostCpuHot: a chip whose critical point is not one does not ---------- + # smaug's DIMM sensors report a critical point of 0 °C, so every sample is + # over it. They are not coretemp, so the rule never reads them. + - interval: 1m + input_series: + - series: 'node_hwmon_temp_celsius{instance="smaug",job="node",chip="i2c_0_0_0018",sensor="temp1"}' + values: "28x20" + - series: 'node_hwmon_temp_crit_celsius{instance="smaug",job="node",chip="i2c_0_0_0018",sensor="temp1"}' + values: "0x20" + alert_rule_test: + - eval_time: 15m + alertname: HostCpuHot + exp_alerts: [] + # --- HostBatteryHot: fires at 48 °C after five minutes -------------------- # 48 is inside the band a swollen or charging-out-of-spec cell produces and # comfortably over the 45 the rule reads. The cell this threshold was measured