diff --git a/hosts/12kingdoms-youko/homelab-services/monitoring/alert_rules/node-exporter.yml b/hosts/12kingdoms-youko/homelab-services/monitoring/alert_rules/node-exporter.yml index e47887f3..44f543a8 100644 --- a/hosts/12kingdoms-youko/homelab-services/monitoring/alert_rules/node-exporter.yml +++ b/hosts/12kingdoms-youko/homelab-services/monitoring/alert_rules/node-exporter.yml @@ -307,8 +307,8 @@ groups: - alert: HostPhysicalComponentTooHot expr: '((node_hwmon_temp_celsius * ignoring(label) group_left(instance, job, node, sensor) - node_hwmon_sensor_label{label!="tctl"} > 75)) * on(instance) group_left (nodename) - node_uname_info{nodename=~".+"}' + node_hwmon_sensor_label{label!~"(?i)^(tctl|tccd|tdie)$"} > 75)) * on(instance) group_left + (nodename) node_uname_info{nodename=~".+"}' for: 5m labels: severity: warning diff --git a/hosts/12kingdoms-youko/homelab-services/monitoring/alert_rules/storage.yml b/hosts/12kingdoms-youko/homelab-services/monitoring/alert_rules/storage.yml index cd9bed97..b0b3f3c4 100644 --- a/hosts/12kingdoms-youko/homelab-services/monitoring/alert_rules/storage.yml +++ b/hosts/12kingdoms-youko/homelab-services/monitoring/alert_rules/storage.yml @@ -70,8 +70,11 @@ groups: description: "{{ $value }} unrecovered data-integrity errors recorded." # Drive temperature (SSD/HDD). Consumer M.2 NVMe throttles around 70-80 C. + # The metric carries the drive's rated `op_limit_max`/`critical_limit_max` + # alongside `current`; without `temperature_type="current"` the max() alerts on + # those constant limits (e.g. youko's 120/130 C) instead of the real reading. - alert: DriveTemperatureHigh - expr: max by (host, device) (smartctl_device_temperature) > 70 + expr: max by (host, device) (smartctl_device_temperature{temperature_type="current"}) > 70 for: 15m labels: severity: warning @@ -80,7 +83,7 @@ groups: description: "Drive temperature above 70 C; NVMe throttles around 70-80 C." - alert: DriveTemperatureCritical - expr: max by (host, device) (smartctl_device_temperature) > 80 + expr: max by (host, device) (smartctl_device_temperature{temperature_type="current"}) > 80 for: 5m labels: severity: critical diff --git a/lib/genMicrovmGuestModule.nix b/lib/genMicrovmGuestModule.nix index 3db73995..e4d9cbc5 100644 --- a/lib/genMicrovmGuestModule.nix +++ b/lib/genMicrovmGuestModule.nix @@ -127,6 +127,12 @@ in system.stateVersion = "26.05"; + # The guest shares the host's read-only /nix/store (virtiofs) and has no store + # of its own, so its nix-gc.service can never succeed; it just failed on every + # k3s guest and tripped HostSystemdServiceCrashed. The host's own nix.gc + # reclaims the shared store, so disable automatic GC inside the guest. + nix.gc.automatic = false; + # MicroVM guests share the host's store and have no physical hardware to # inspect, nothing to trace, no persisted /var/cache for a `locate` index, # and nothing to advertise over mDNS.