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

on Raspberry Pi: err="error parsing mdstatus: error parsing mdstat /proc/mdstat: open /proc/mdstat: no such file or directory" #1719

Closed
vielmetti opened this issue May 26, 2020 · 3 comments · Fixed by #1735
Labels
bug platform/Linux Linux specific issue

Comments

@vielmetti
Copy link

Host operating system: output of uname -a

Linux piaware 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux

node_exporter version: output of node_exporter --version

node_exporter, version 1.0.0 (branch: HEAD, revision: b9c96706a7425383902b6143d097cf6d7cfd1960)
  build user:       root@3e55cc20ccc0
  build date:       20200526-06:03:58
  go version:       go1.14.3

node_exporter command line flags

./node_exporter --web.listen-address="100.xx.xx.xx:9100" &

Are you running node_exporter in Docker?

What did you do that produced an error?

System is producing statistics, but I'm getting an error ever poll from mdstat

level=error ts=2020-05-26T20:15:43.377Z caller=collector.go:161 msg="collector failed" name=mdadm duration_seconds=0.000192865 err="error parsing mdstatus: error parsing mdstat /proc/mdstat: open /proc/mdstat: no such file or directory"

What did you expect to see?

No errors in logfile for default distribution

What did you see instead?

complaints about mdstat

@vielmetti
Copy link
Author

The documentation states

Exposes statistics about devices in /proc/mdstat (does nothing if no /proc/mdstat present).

so I think this is genuinely a bug, either in the docs (to warn you to disable it), or in the code (to skip the metric if the file is not found).

@SuperQ SuperQ added the bug label May 26, 2020
@SuperQ
Copy link
Member

SuperQ commented May 26, 2020

Yes, this looks like a bug in the upstream procfs library that parses the mstat file. Should be easy to fix. For now, you can manually disable the collector with --no-collector.mdadm to avoid the log noise.

@SuperQ SuperQ added the platform/Linux Linux specific issue label May 26, 2020
SuperQ added a commit to prometheus/procfs that referenced this issue May 27, 2020
Don't touch the ioutil error message so that the return can be tested
with `os.IsNotExist()`.

Related to prometheus/node_exporter#1719

Signed-off-by: Ben Kochie <[email protected]>
@discordianfish
Copy link
Member

Meh.. that's unfortunate right after 1.0..
@SuperQ Should we have tests to catch these kind of issues?

SuperQ added a commit that referenced this issue Jun 6, 2020
Update prometheus/procfs

Fixes: #1719
Fixes: #1721

Signed-off-by: Ben Kochie <[email protected]>
opsxcq added a commit to opsxcq/ansible-role-linux-server that referenced this issue Feb 25, 2021
remijouannet pushed a commit to remijouannet/procfs that referenced this issue Oct 20, 2022
Don't touch the ioutil error message so that the return can be tested
with `os.IsNotExist()`.

Related to prometheus/node_exporter#1719

Signed-off-by: Ben Kochie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug platform/Linux Linux specific issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants