Watch
0
0
Fork
You've already forked hyperhive
0

report the btrfs-subvolume root in host filesystem metrics

This commit is contained in:
atlas 2026-11-08 03:03:49 +01:00
commit aeef4634e1

View file

@ -207,6 +207,31 @@ let
&& (settings matrixElsewhere).receivers ? hostmetrics
&& lib.elem "hostmetrics" (pipeline matrixElsewhere);
}
{
# The root of a btrfs `subvol=@` host has a mountinfo root other than
# `/`, which the scraper drops as a bind mount unless virtual
# filesystems are included. The strict list is what keeps that from
# reporting every tmpfs and per-container subvolume. The lookup is
# read on a host that has the receiver (the pipeline arm above is its
# control).
name = "the host collector's filesystem scraper includes virtual filesystems and reports only the listed mount points";
ok =
let
fs =
matrixElsewhere.services.opentelemetry-collector.settings.receivers.hostmetrics.scrapers.filesystem;
in
fs.include_virtual_filesystems == true
&& fs.include_mount_points.match_type == "strict"
&&
fs.include_mount_points.mount_points
== matrixElsewhere.services.hyperhive.otel.collector.filesystemMountPoints
&&
fs.include_mount_points.mount_points == [
"/"
"/boot"
"/nix"
];
}
{
# The size is read from the database directory, as the dynamic user the
# homeserver runs as, and pushed to the forwarder's OTLP port. Without a