已挂载的卷未显示在Prometheus节点导出中

huangapple go评论51阅读模式
英文:

Mounted volume not shown in prometheus node export

问题

我有一个云服务器,挂载了卷/dev/sdb到/mnt/HC_Volume_1111

lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 38.2G 0 disk
├─sda1 8:1 0 38G 0 part /
├─sda14 8:14 0 1M 0 part
└─sda15 8:15 0 122M 0 part /boot/efi
sdb 8:16 0 100G 0 disk /mnt/HC_Volume_1111
sr0 11:0 1 1024M 0 rom


我尝试在我的Prometheus Grafana仪表板中获取这个卷的剩余空间,但我只收到了关于我的/dev/sda的信息。

这是我的Grafana查询:

100 - (node_filesystem_avail_bytes{instance="testurl.com:9100", fstype="ext4"} / node_filesystem_size_bytes{instance="testurl.com:9100", fstype="ext4"} * 100)


如何获取挂载卷的信息?

提前感谢
英文:

I have a cloud server with a mounted volume /dev/sdb on /mnt/HC_Volume_1111

# lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda       8:0    0 38.2G  0 disk 
├─sda1    8:1    0   38G  0 part /
├─sda14   8:14   0    1M  0 part 
└─sda15   8:15   0  122M  0 part /boot/efi
sdb       8:16   0  100G  0 disk /mnt/HC_Volume_1111
sr0      11:0    1 1024M  0 rom

I try to get the free space of this volume in my prometheus grafana dashboard, but I only receive the information for my /dev/sda.

This is my query in Grafana:

100 - (node_filesystem_avail_bytes{instance="testurl.com:9100", fstype="ext4"} / node_filesystem_size_bytes{instance="testurl.com:9100", fstype="ext4"} * 100)

How to get the information for my mounted volume as well?

Thanks in advice

答案1

得分: 1

我向我的Prometheus Node Exporter服务添加了以下参数,现在它正常工作:

--collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+)($|/) --collector.filesystem.ignored-fs-types=^(tmpfs|autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$
英文:

I added the the following args to my prometheus-node-exporter service and now it's working

--collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/docker/.+)($|/) --collector.filesystem.ignored-fs-types=^(tmpfs|autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$

huangapple
  • 本文由 发表于 2023年3月7日 00:29:12
  • 转载请务必保留本文链接:https://go.coder-hub.com/75653374.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定