excluded zfs arc from used memory alarm; fixes #2271
Costa Tsaousis (ktsaou) committed
Jun 21, 2017 at 22:55 UTC
678bfeb6c9dcef37a94fd4811a2b1759156bce96
2 files changed
+10
-3
conf.d/health.d/ram.conf
+8
-1
@@ -1,7 +1,14 @@
1
2
+ alarm: used_ram_to_ignore
3
+ on: system.ram
4
+ calc: ($zfs.arc_size.arcsz = nan)?(0):($zfs.arc_size.arcsz)
5
+ every: 10s
6
+ info: the amount of memory that is reported as used, but it is actually capable for resizing itself based on the system needs (eg. ZFS ARC)
7
+
8
alarm: ram_in_use
9
on: system.ram
4
- calc: $used * 100 / ($used + $cached + $free)
10
+# calc: $used * 100 / ($used + $cached + $free)
11
+ calc: ($used - $used_ram_to_ignore) * 100 / ($used - $used_ram_to_ignore + $cached + $free)
12
units: %
13
every: 10s
14
warn: $this > (($status >= $WARNING) ? (80) : (90))
src/health_config.c
+2
-2
@@ -32,8 +32,8 @@ static inline int rrdcalc_add_alarm_from_config(RRDHOST *host, RRDCALC *rc) {
32
return 0;
33
}
34
35
- if(!RRDCALC_HAS_DB_LOOKUP(rc) && !rc->warning && !rc->critical) {
36
- error("Health configuration for alarm '%s.%s' is useless (no calculation, no warning and no critical evaluation)", rc->chart?rc->chart:"NOCHART", rc->name);
35
+ if(!RRDCALC_HAS_DB_LOOKUP(rc) && !rc->calculation && !rc->warning && !rc->critical) {
36
+ error("Health configuration for alarm '%s.%s' is useless (no db lookup, no calculation, no warning and no critical expressions)", rc->chart?rc->chart:"NOCHART", rc->name);
37
return 0;
38
}
39