Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there some metrics about bare disk(not mounted) capacity? #2595

Open
SeanHai opened this issue Feb 10, 2023 · 2 comments
Open

Is there some metrics about bare disk(not mounted) capacity? #2595

SeanHai opened this issue Feb 10, 2023 · 2 comments

Comments

@SeanHai
Copy link

SeanHai commented Feb 10, 2023

Host operating system: output of uname -a

Linux nas10 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

node_exporter version: output of node_exporter --version

node_exporter" version="(version=1.5.0, branch=HEAD, revision=1b48970ffcf5630534fb00bb0687d73c66d1c959)"

node_exporter command line flags

docker run -d -p 19100:19100
--restart=always
--net="host"
--pid="host"
-v "/:/host:ro,rslave"
-v /run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket:ro
quay.io/prometheus/node-exporter:latest
--web.listen-address=":19100"
--path.rootfs=/host
--collector.systemd
--collector.cpu.info

node_exporter log output

ts=2023-02-10T07:02:44.574Z caller=node_exporter.go:180 level=info msg="Starting node_exporter" version="(version=1.5.0, branch=HEAD, revision=1b48970ffcf5630534fb00bb0687d73c66d1c959)"
ts=2023-02-10T07:02:44.574Z caller=node_exporter.go:181 level=info msg="Build context" build_context="(go=go1.19.3, user=root@6e7732a7b81b, date=20221129-18:59:09)"
ts=2023-02-10T07:02:44.575Z caller=diskstats_common.go:111 level=info collector=diskstats msg="Parsed flag --collector.diskstats.device-exclude" flag=^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\d+n\d+p)\d+$
ts=2023-02-10T07:02:44.575Z caller=diskstats_linux.go:264 level=error collector=diskstats msg="Failed to open directory, disabling udev device properties" path=/run/udev/data
ts=2023-02-10T07:02:44.575Z caller=filesystem_common.go:111 level=info collector=filesystem msg="Parsed flag --collector.filesystem.mount-points-exclude" flag=^/(dev|proc|run/credentials/.+|sys|var/lib/docker/.+|var/lib/containers/storage/.+)($|/)
ts=2023-02-10T07:02:44.575Z caller=filesystem_common.go:113 level=info collector=filesystem msg="Parsed flag --collector.filesystem.fs-types-exclude" flag=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$
ts=2023-02-10T07:02:44.575Z caller=systemd_linux.go:152 level=info collector=systemd msg="Parsed flag --collector.systemd.unit-include" flag=.+
ts=2023-02-10T07:02:44.575Z caller=systemd_linux.go:154 level=info collector=systemd msg="Parsed flag --collector.systemd.unit-exclude" flag=.+.(automount|device|mount|scope|slice)
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:110 level=info msg="Enabled collectors"
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=arp
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=bcache
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=bonding
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=btrfs
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=conntrack
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=cpu
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=cpufreq
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=diskstats
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=dmi
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=edac
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=entropy
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=fibrechannel
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=filefd
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=filesystem
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=hwmon
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=infiniband
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=ipvs
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=loadavg
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=mdadm
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=meminfo
ts=2023-02-10T07:02:44.575Z caller=node_exporter.go:117 level=info collector=netclass
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=netdev
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=netstat
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=nfs
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=nfsd
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=nvme
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=os
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=powersupplyclass
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=pressure
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=rapl
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=schedstat
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=selinux
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=sockstat
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=softnet
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=stat
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=systemd
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=tapestats
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=textfile
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=thermal_zone
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=time
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=timex
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=udp_queues
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=uname
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=vmstat
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=xfs
ts=2023-02-10T07:02:44.576Z caller=node_exporter.go:117 level=info collector=zfs
ts=2023-02-10T07:02:44.576Z caller=tls_config.go:232 level=info msg="Listening on" address=[::]:19100
ts=2023-02-10T07:02:44.576Z caller=tls_config.go:235 level=info msg="TLS is disabled." http2=false address=[::]:19100

Are you running node_exporter in Docker?

Yes

What did you do that produced an error?

Is there some metrics about bare disk(not mounted) capacity?

What did you expect to see?

What did you see instead?

@dswarbrick
Copy link
Contributor

No, not currently.

A good starting point would be exposing /sys/block/*/size, which is measured in 512-byte sectors (regardless of block device actual sector size).

@fs185143
Copy link

fs185143 commented Jul 2, 2024

No, not currently.

A good starting point would be exposing /sys/block/*/size, which is measured in 512-byte sectors (regardless of block device actual sector size).

working on a PR for this here #3068

would appreciate some feedback before I go much further, thanks 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants