Werk #16929: Solaris memory monitoring: fix crash and incorrect swap values with top
| Component | Checks & agents | ||||||||
| Title | Solaris memory monitoring: fix crash and incorrect swap values with top | ||||||||
| Date | Aug 13, 2026 | ||||||||
| Level | Trivial Change | ||||||||
| Class | Bug Fix | ||||||||
| Compatibility | Compatible - no manual interaction needed | ||||||||
| Checkmk versions & editions |
|
On Solaris hosts where the agent reports memory via top (the fallback used
when libstatgrab is unavailable), the Memory service could crash (go to an
UNKNOWN state) or report incorrect swap values.
top prints only non-zero values in its Memory: line, so any field that is
exactly 0 - for example "free swap" when swap is full, or "swap in use" when
swap is configured but unused - is dropped from the line entirely.
The solaris_mem plugin previously read the fields by position: this crashed
when a trailing field was missing and mis-assigned the remaining values when
an inner field was dropped (for instance reporting swap as full while it was
actually free).
The plugin now matches each value by its label, so memory and swap are reported
correctly regardless of which zero-valued fields top leaves out. Both known
top output variants are supported.