influxdata / influxdata/telegraf
[[inputs.mem]] Incorrect "used" value since v1.36 combining used + shared
- Dominant language
- Go
- Stars
- 17.8k
- Forks
- 5.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 161
Description
### Relevant telegraf.conf
```toml
# Read metrics about memory usage
[[inputs.mem]]
# no configuration
```
### Logs from Telegraf
```text
no errors
```
### System info
Telegraf 1.36.2 (git: HEAD@8bdd0265)
Ubuntu 22.04.5 LTS
Linux 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
### Docker
N/A
### Steps to reproduce
1. update from telegraf 1.35.4 to 1.36.2
2. check the recorded data relative to the memory metric "used"
3. see that any graph or value with the memory metric "used" change drastically.
### Expected behavior
no change in the "used" metric after the update.
### Actual behavior
After investigation, with v1.36.2, the metric "used" is now combining the "used" + "shared" values.
Reverting to v1.35.4 will bring back the expected values.
I didn't see anything mentioning this change in the v1.36.* release notes, while it is really impactful for monitoring the system memory.
### Additional info
Very noticeable on this graph, with the sudden increase of consumption was when updating to v1.36.2 the 10/02 at 06h.
The system shown has a large chunk of shared memory used by virtual machines, and only 32 Gb of ram.
When stacked, the new "used" metric show clearly being a combination of both "used" and "shared", and will go over the maximum amount of ram.
left part : v1.35.4 up to 10/02 - 06h00, right part : v1.36.2
No other process was restarted aside telegraf.
All the other graphs related to the memory usage but without the metric "used" stayed the same as expected before and after the update.
Contributor guide
Research direction
Start at the inputs.mem plugin entry point and reproduce the reported change using the minimal configuration on Telegraf 1.35.4 and 1.36.2. Compare the used and shared metric values across both versions; done means the used metric no longer unexpectedly combines used and shared, with coverage for the regression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100