ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
NodeExporter中有三个指标:`node_filesystem_size_bytes`、`node_filesystem_free_bytes`与`node_filesystem_avail_bytes`。其中,`node_filesystem_avail_bytes`是指`non-root`(非root)用户可用的空间: ``` # HELP node_filesystem_size_bytes Filesystem size in bytes. # TYPE node_filesystem_size_bytes gauge node_filesystem_size_bytes{device="/dev/sda1",fstype="ext4",mountpoint="/boot"} 4.99337216e+08 node_filesystem_size_bytes{device="/dev/sda2",fstype="ext4",mountpoint="/"} 1.177732304896e+12 node_filesystem_size_bytes{device="/dev/sdb",fstype="xfs",mountpoint="/data1"} 1.196627075072e+12 node_filesystem_size_bytes{device="/dev/sdc",fstype="xfs",mountpoint="/data2"} 1.196627075072e+12 node_filesystem_size_bytes{device="shm",fstype="tmpfs",mountpoint="/app/docker/containers/f446e738681bf852ee68b255643db17d34ff22db3febf55ef32314fb73f75972/shm"} 6.7108864e+07 node_filesystem_size_bytes{device="tmpfs",fstype="tmpfs",mountpoint="/run"} 2.70442676224e+11 ... # HELP node_filesystem_free_bytes Filesystem free space in bytes. # TYPE node_filesystem_free_bytes gauge node_filesystem_free_bytes{device="/dev/sda1",fstype="ext4",mountpoint="/boot"} 2.51290624e+08 node_filesystem_free_bytes{device="/dev/sda2",fstype="ext4",mountpoint="/"} 9.56563177472e+11 node_filesystem_free_bytes{device="/dev/sdb",fstype="xfs",mountpoint="/data1"} 1.193953947648e+12 node_filesystem_free_bytes{device="/dev/sdc",fstype="xfs",mountpoint="/data2"} 1.196593258496e+12 node_filesystem_free_bytes{device="shm",fstype="tmpfs",mountpoint="/app/docker/containers/f446e738681bf852ee68b255643db17d34ff22db3febf55ef32314fb73f75972/shm"} 6.7108864e+07 node_filesystem_free_bytes{device="tmpfs",fstype="tmpfs",mountpoint="/run"} 2.70432825344e+11 ... # 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/sda1",fstype="ext4",mountpoint="/boot"} 2.2088192e+08 node_filesystem_avail_bytes{device="/dev/sda2",fstype="ext4",mountpoint="/"} 8.96712138752e+11 node_filesystem_avail_bytes{device="/dev/sdb",fstype="xfs",mountpoint="/data1"} 1.193953947648e+12 node_filesystem_avail_bytes{device="/dev/sdc",fstype="xfs",mountpoint="/data2"} 1.196593258496e+12 node_filesystem_avail_bytes{device="shm",fstype="tmpfs",mountpoint="/app/docker/containers/f446e738681bf852ee68b255643db17d34ff22db3febf55ef32314fb73f75972/shm"} 6.7108864e+07 node_filesystem_avail_bytes{device="tmpfs",fstype="tmpfs",mountpoint="/run"} 2.70432825344e+11 ... ``` 一般,我们只监控`fstype`为xfs或ext4的磁盘