prometheus / prometheus/node_exporter

filetem ntrices prompts that the string description is inaccurate

Open
#2,976 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
13.8k
Forks
2.7k
Avg merge
1d 23h
Merged PRs (30d)
8

Description

The following description is inaccurate

# HELP node_filesystem_avail_bytes Filesystem space available to non-root users in bytes.
# TYPE node_filesystem_avail_bytes gauge
node_filesystem_avail_bytes{device="/dev/loop0",device_error="",fstype="ext4",mountpoint="/mnt"} 1.916194816e+09
node_filesystem_avail_bytes{device="/dev/mapper/uos-home",device_error="",fstype="xfs",mountpoint="/home"} 2.1702529024e+10
node_filesystem_avail_bytes{device="/dev/mapper/uos-root",device_error="",fstype="xfs",mountpoint="/"} 6.729623552e+10
node_filesystem_avail_bytes{device="/dev/vda1",device_error="",fstype="vfat",mountpoint="/boot/efi"} 5.77241088e+08
node_filesystem_avail_bytes{device="/dev/vda2",device_error="",fstype="xfs",mountpoint="/boot"} 8.01288192e+08
node_filesystem_avail_bytes{device="gvfsd-fuse",device_error="",fstype="fuse.gvfsd-fuse",mountpoint="/run/user/0/gvfs"} 0
node_filesystem_avail_bytes{device="tmpfs",device_error="",fstype="tmpfs",mountpoint="/run"} 3.76717312e+09
node_filesystem_avail_bytes{device="tmpfs",device_error="",fstype="tmpfs",mountpoint="/run/user/0"} 7.54270208e+08
node_filesystem_avail_bytes{device="tmpfs",device_error="",fstype="tmpfs",mountpoint="/tmp"} 3.768139776e+09
# HELP node_filesystem_device_error Whether an error occurred while getting statistics for the given device.
# TYPE node_filesystem_device_error gauge

The man manual describes this field as follows

DESCRIPTION
The statfs() system call returns information about a mounted filesystem. path is the pathname of any file within the mounted filesystem. buf is a pointer to a statfs structure defined approximately
as follows:

       struct statfs {
           __fsword_t f_type;    /* Type of filesystem (see below) */
           __fsword_t f_bsize;   /* Optimal transfer block size */
           fsblkcnt_t f_blocks;  /* Total data blocks in filesystem */
           fsblkcnt_t f_bfree;   /* Free blocks in filesystem */
           **fsblkcnt_t f_bavail;  /* Free blocks available to
                                    unprivileged user */**
           fsfilcnt_t f_files;   /* Total file nodes in filesystem */
           fsfilcnt_t f_ffree;   /* Free file nodes in filesystem */
           fsid_t     f_fsid;    /* Filesystem ID */
           __fsword_t f_namelen; /* Maximum length of filenames */
           __fsword_t f_frsize;  /* Fragment size (since Linux 2.6) */
           __fsword_t f_flags;   /* Mount flags of filesystem
                                    (since Linux 2.6.36) */
           __fsword_t f_spare[xxx];
                           /* Padding bytes reserved for future use */
       };

my suggestion

Modify description from: Filesystem space available to non-root users in bytes.
to: Filesystem space available tounprivileged user in bytes.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the metric description for node_filesystem_avail_bytes and compare its HELP text with the statfs() definition quoted in the issue. Update the wording to accurately describe space available to unprivileged users, then run the relevant exporter tests or checks available in the repository to confirm the generated metric text.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.