Skip to content

feat(monitoring): homelab hosts send their journals to Loki and their health metrics to Prometheus #1080

Closed

Description

@dan-petty

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) sets useIntegrationAllowList: false and keeps only node_time_seconds beyond the chart defaults. Prometheus has no node_boot_time_seconds, node_hwmon_temp_celsius, node_systemd_unit_state, node_edac_*, node_nvme_info or pressure series (checked 2026-10-03 with count 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 job label values on 2026-10-03 are all <namespace>/<container>, integrations/kubernetes/eventhandler and fluent-bit). No host journal reaches it: no kernel log (GPU Xid errors, MCEs, thermal events), no k3s/k3s-agent, no nvidia-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-boots and local journals; nothing in the monitoring stack showed the reboots or their cause.

Acceptance criteria

  • k8s/monitoring/k8s-monitoring-values.yaml turns 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 units k3s, 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_names if 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 template of the changed values renders, and helm upgrade --dry-run=server against 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, and node_boot_time_seconds has 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 offline group are not running.

Strategic alignment

Activity

  1. added this to the v0.2.25 milestone on Oct 3, 2026
  2. added
    type/feature
    scope/k8s
    priority/p2-medium
    on Oct 3, 2026
  3. dan-petty commented on Oct 3, 2026

    @dan-petty
    OwnerAuthor

    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.

  4. added a commit that references this issue on Oct 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p2-mediumscope/k8stype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions