prometheus / prometheus/node_exporter

Meminfo metric naming inconsistency

Open
#3,460 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
13.8k
Forks
2.7k
Avg merge
1d 23h
Merged PRs (30d)
8

Description

Currently /proc/meminfo metrics have suffix _bytes (which is great), e.g MemTotal becomes MemTotal_bytes:

https://github.com/prometheus/node_exporter/blob/654f19dee6a0c41de78a8d6d870e8c742cdb43b9/collector/meminfo_linux.go#L52-L63

however their NUMA-counterpart does not (i.e MemTotal remains "as is"):

https://github.com/prometheus/node_exporter/blob/654f19dee6a0c41de78a8d6d870e8c742cdb43b9/collector/meminfo_numa_linux.go#L152-L154

I suppose this is a bug?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the metric construction in collector/meminfo_linux.go at lines 52-63 with the NUMA construction in collector/meminfo_numa_linux.go at lines 152-154. Check nearby collector tests or metric naming expectations, then make the NUMA metrics use the same byte suffix convention and verify the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
observability
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.