From 19f8e01ac35aeca761e08a74c087d62b78c8c021 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 10 May 2026 10:50:18 +0300 Subject: nfs-monitor: make textfile .prom world-readable for node_exporter node_exporter runs as uid 65534 (nobody); mktemp creates files with mode 600 (root-only). Add chmod 644 before the atomic mv so the node_exporter process can read nfs_mount_monitor.prom on its scrape. Co-Authored-By: Claude Sonnet 4.6 --- f3s/r-nodes/nfs-mount-monitor/check-nfs-mount.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'f3s') diff --git a/f3s/r-nodes/nfs-mount-monitor/check-nfs-mount.sh b/f3s/r-nodes/nfs-mount-monitor/check-nfs-mount.sh index 0a772d8..882b982 100644 --- a/f3s/r-nodes/nfs-mount-monitor/check-nfs-mount.sh +++ b/f3s/r-nodes/nfs-mount-monitor/check-nfs-mount.sh @@ -110,6 +110,8 @@ write_textfile_metric() { printf '# HELP nfs_mount_monitor_consecutive_failures Consecutive NFS fix_mount failure count\n' > "$tmp_file" printf '# TYPE nfs_mount_monitor_consecutive_failures gauge\n' >> "$tmp_file" printf 'nfs_mount_monitor_consecutive_failures{host="%s"} %s\n' "$host" "$count" >> "$tmp_file" + # Make the file world-readable so node_exporter (uid 65534) can scrape it. + chmod 644 "$tmp_file" mv "$tmp_file" "$TEXTFILE_PROM" } -- cgit v1.2.3