summaryrefslogtreecommitdiffstats
path: root/conf.d
diff options
context:
space:
mode:
authorVladislav Movchan <vladislav.movchan@gmail.com>2018-10-12 01:20:44 +0300
committerCosta Tsaousis <costa@tsaousis.gr>2018-10-12 01:20:44 +0300
commit8eaf5d0de5e5c9049549e6bf9927ea4c304be3ab (patch)
tree4fbbad7c404b4b8ac62a898f6f84573c799e9155 /conf.d
parent2cc264eff5925769a4ae082e9b23f31c00ef23ec (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
Diffstat (limited to 'conf.d')
-rw-r--r--conf.d/health.d/ram.conf2
1 files changed, 1 insertions, 1 deletions
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))