Check BSD's mib which accounts for swap size#1149
Check BSD's mib which accounts for swap size#1149discordianfish merged 5 commits intoprometheus:masterfrom
Conversation
Signed-off-by: iori-yja <fivio.11235813@gmail.com>
Signed-off-by: iori-yja <fivio.11235813@gmail.com>
collector/memory_bsd.go
Outdated
There was a problem hiding this comment.
What if vm.swap_size is not correct either? what about other BSDs?
would it make sense to check for the specific kind of error that switching to _size can fix (not found, I suppose?)
There was a problem hiding this comment.
I suppose this collector only supports Dragonfly and FreeBSD. They are relatively similar to each other comparing to other BSD variants, and in this case, that mib is the only difference. If there is _total, implicitly it is supposed to be FreeBSD otherwise Dragonfly.
There was a problem hiding this comment.
By the way, meminfo for OpenBSD is supported by another code. https://github.com/prometheus/node_exporter/blob/master/collector/meminfo_openbsd.go
|
Hrmm buildkite fails on freebsd with: Doesn't look related to this PR though. Can you try rebasing, maybe this was broken in master? |
Signed-off-by: iori-yja <fivo.11235813@gmail.com>
Signed-off-by: iori-yja <fivo.11235813@gmail.com>
adca1a0 to
d6e61df
Compare
This is weird... but anyway I've rebased to current origin/master just now. |
|
Nice, that fixed it. LGTM! |
* Change Dfly's CPU counting frequency, see: prometheus#1129 Signed-off-by: iori-yja <fivio.11235813@gmail.com> * Convert Dfly's CPU unit into second Signed-off-by: iori-yja <fivio.11235813@gmail.com> * Check BSD's mib which accounts for swap size; see prometheus#1127 Signed-off-by: iori-yja <fivo.11235813@gmail.com> * fix swap check code Signed-off-by: iori-yja <fivo.11235813@gmail.com>
* Change Dfly's CPU counting frequency, see: prometheus#1129 Signed-off-by: iori-yja <fivio.11235813@gmail.com> * Convert Dfly's CPU unit into second Signed-off-by: iori-yja <fivio.11235813@gmail.com> * Check BSD's mib which accounts for swap size; see prometheus#1127 Signed-off-by: iori-yja <fivo.11235813@gmail.com> * fix swap check code Signed-off-by: iori-yja <fivo.11235813@gmail.com>
Discussion was here:
#1127