prometheus / prometheus/node_exporter
mountstats: not enough information for NFS stats
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.8k
- Forks
- 2.7k
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 8
Description
Host operating system: output of uname -a
Linux hostname 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
node_exporter version: output of node_exporter --version
node_exporter, version 0.15.2+ds (branch: debian/sid, revision: 0.15.2+ds-1)
build user: pkg-go-maintainers@lists.alioth.debian.org
build date: 20171214-15:26:08
go version: go1.9.2
node_exporter command line flags
--collector.mountstats
Are you running node_exporter in Docker?
No
What did you do that produced an error?
Nothing special, just scrape node exporter
What did you expect to see?
Mountstats metrics
What did you see instead?
No mountstats metrics. In logs:
Jan 07 14:15:10 hostname prometheus-node-exporter[22123]: time="2020-01-07T14:15:10Z" level=error msg="ERROR: mountstats collector failed after 0.005747s: failed to parse mountstats: not enough information for NFS stats: [obfuscated...] source="collector.go:123"
This is caused by following line, because my mountstats contain following line (sorry I had to obfuscate it, this is not real output, but it is multiline):
impl_id: name='XXX 10.7-STABLE #0 r325575+d8sf789df(HEAD): Fri May 5 12:42:01 EDT 2018
user@hostname:/path/to/something
',domain='something.com',date='1789840000,0'
caps: ...
I believe, that this is caused, because there are no 2 fields in some line and procfs parser just fails. If I remove replace the return nil, fmt.Errorf("not enough information for NFS stats: %v", ss) by continue, everything works as expected.
Thanks for any help.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The mountstats collector is enabled with --collector.mountstats; start at procfs mountstats.go line 340 and inspect the reported malformed multiline NFS record. Confirm the parser handles that record without dropping mountstats metrics, then verify the collector succeeds when scraping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100