Repository navigation
Closed
Labels
priority/p2-mediumPriority P2: standard workscope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/featureType feature: a new function
Milestone
Description
Problem
Every homelab node runs the k8s-monitoring chart's node-exporter and Alloy log collector as DaemonSets, but neither keeps what explains a host failure:
- Metrics.
hostMetrics.linuxHosts.metricsTuning(k8s/monitoring/k8s-monitoring-values.yaml:57-63) setsuseIntegrationAllowList: falseand keeps onlynode_time_secondsbeyond the chart defaults. Prometheus has nonode_boot_time_seconds,node_hwmon_temp_celsius,node_systemd_unit_state,node_edac_*,node_nvme_infoor pressure series (checked 2026-10-03 withcount by (__name__)), so an unclean restart, a hot component or a dead systemd unit is invisible. - Logs. Loki holds pod logs and Kubernetes events only (its
joblabel values on 2026-10-03 are all<namespace>/<container>,integrations/kubernetes/eventhandlerandfluent-bit). No host journal reaches it: no kernel log (GPU Xid errors, MCEs, thermal events), nok3s/k3s-agent, nonvidia-power-limit. - Why it matters. On 2026-10-03 all four nodes lost power together three times (a shared breaker tripped under full-cluster LLM load). The timeline had to be rebuilt by SSHing to each host and reading
journalctl --list-bootsand local journals; nothing in the monitoring stack showed the reboots or their cause.
Acceptance criteria
k8s/monitoring/k8s-monitoring-values.yamlturns on the chart's node journal log collection through the existing Alloy logs collector (no new agent, no host install), for the kernel and the unitsk3s,k3s-agent,nvidia-power-limit,containerd,systemd-journald(and others the builder justifies), labelled by node and unit, with a priority/rate filter that keeps volume within Loki's sizing from Metrics and logs are kept for two hours #550. A test pins the feature and the unit list.- The host metrics allowlist adds at least:
node_boot_time_seconds,node_hwmon_temp_celsius(+node_hwmon_chip_namesif needed for labels),node_systemd_unit_state(restricted to the units above),node_pressure_*,node_edac_correctable_errors_total/node_edac_uncorrectable_errors_total,node_nvme_info,node_filesystem_avail_bytes/node_filesystem_size_bytes. Each needs a collector the chart's node-exporter runs; the builder confirms against the chart version in use (k8s-monitoring 4.5.2) and enables collectors only through chart values. A test pins the list. - Series added per node are counted (
count({__name__=~"<new metrics>"}) by (instance)) and stay under a stated budget. helm templateof the changed values renders, andhelm upgrade --dry-run=serveragainst the cluster succeeds.- Pending a person: after the change is applied,
{job=~".*journal.*"}(or the label the chart uses) in Loki returns kernel and k3s lines from all four nodes, andnode_boot_time_secondshas one series per node.
Key questions
- Alloy journal collection or Fluent Bit's systemd input? Proposed: Alloy, through the chart's node-logs feature; fix(k8s): pod logs reach loki once and labelled, with alloy as the only shipper (remove fluent-bit) #548 makes Alloy the only log shipper.
- Which units and priorities? Proposed: kernel at all priorities (Xid and MCE lines matter), the listed units at info and above, everything else at warning and above; revisit after a week of volume data.
- Does this need a host agent outside Kubernetes? Proposed: no. Every live host is a k3s node; hosts in the inventory's
offlinegroup are not running.
Strategic alignment
- Milestone v0.2.25 at the owner's direction (2026-10-03), P2.
- Depends on Metrics and logs are kept for two hours #550 (Loki storage and retention sized before host journals add volume). Alerts fire into nothing: no Alertmanager, and k3s false positives #549 adds the alert rules over these series. Related: fix(k8s): pod logs reach loki once and labelled, with alloy as the only shipper (remove fluent-bit) #548 (Alloy as the only shipper), feat(k8s): gpu throttling, power limit, pcie and allocation panels over captured dcgm and kube-state-metrics series #821 (GPU panels).
Metadata
Metadata
Assignees
Labels
priority/p2-mediumPriority P2: standard workscope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/featureType feature: a new function
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(monitoring): homelab hosts send their journals to Loki and their…
feat(monitoring): homelab hosts send their journals to Loki and their…
dan-petty commentedon Oct 3, 2026
Closed by #1093, merged into
release/v0.2.25.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.feat(release): v0.2.25 (#1089)