diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-10 10:50:18 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-10 10:50:18 +0300 |
| commit | 19f8e01ac35aeca761e08a74c087d62b78c8c021 (patch) | |
| tree | e9462c99124ddb61d3dbe8a6857d4a0985a493f7 | |
| parent | d330a0b34a53417a2350014660806e7dc65e3843 (diff) | |
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 <noreply@anthropic.com>
| -rw-r--r-- | f3s/r-nodes/nfs-mount-monitor/check-nfs-mount.sh | 2 |
1 files changed, 2 insertions, 0 deletions
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" } |
