diff options
author | Vladislav Movchan <vladislav.movchan@gmail.com> | 2018-10-12 01:20:44 +0300 |
---|---|---|
committer | Costa Tsaousis <costa@tsaousis.gr> | 2018-10-12 01:20:44 +0300 |
commit | 8eaf5d0de5e5c9049549e6bf9927ea4c304be3ab (patch) | |
tree | 4fbbad7c404b4b8ac62a898f6f84573c799e9155 | |
parent | 2cc264eff5925769a4ae082e9b23f31c00ef23ec (diff) |
Correct ram_in_use alarm calculation on FreeBSD (#4363)
* There is no "cached" dimension on FreeBSD, use "cache" instead
* Account "buffers" as used memory. As buffers by default don't shrink
much under pressure.
* Account "inactive" as free memory. As pages from inactive list could be
cleared and become free as soon as somebody request more memory from
kernel.
* Sign CLA
-rw-r--r-- | CONTRIBUTORS.md | 1 | ||||
-rw-r--r-- | conf.d/health.d/ram.conf | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index af112d7fad..7f6edcb5ca 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -118,3 +118,4 @@ username|name|email (optional) @jonfairbanks|Jon Fairbanks @pjz|Paul Jimenez|pj@place.org @jgrossiord|Julien Grossiord|julien@grossiord.net +@vladmovchan|Vladyslav Movchan|vladislav.movchan@gmail.com diff --git a/conf.d/health.d/ram.conf b/conf.d/health.d/ram.conf index b6dc5f9455..65f7c9c654 100644 --- a/conf.d/health.d/ram.conf +++ b/conf.d/health.d/ram.conf @@ -41,7 +41,7 @@ alarm: ram_in_use on: system.ram os: freebsd hosts: * - calc: (($active + $wired) - $used_ram_to_ignore) * 100 / (($active + $wired) - $used_ram_to_ignore + $cached + $free) + calc: ($active + $wired + $buffers - $used_ram_to_ignore) * 100 / ($active + $wired + $buffers - $used_ram_to_ignore + $cache + $free + $inactive) units: % every: 10s warn: $this > (($status >= $WARNING) ? (80) : (90)) |