memcached alarms #810
Costa Tsaousis (ktsaou) committed
Aug 27, 2016 at 12:03 UTC
90f07ee6353504ab93788f39e9ec432053887747
3 files changed
+33
-2
conf.d/health.d/disks.conf
+1
-1
@@ -27,7 +27,7 @@ template: disk_full_percent
27
template: disk_fill_rate
28
on: disk.space
29
lookup: max -1s at -30m unaligned of avail
30
- calc: ($this - $avail) / (30 * 60)
30
+ calc: ($this - $avail) / ($now - $after)
31
every: 15s
32
33
conf.d/health.d/memcached.conf
+31
@@ -8,3 +8,34 @@ template: memcached_last_collected_secs
8
warn: $this > ( 5 * $update_every)
9
crit: $this > (10 * $update_every)
10
11
+
12
+
13
+# detect if memcached cache is full
14
+
15
+template: cache_full_pcent
16
+ on: memcached.cache
17
+ calc: $used * 100 / ($used + $available)
18
+ every: 10s
19
+ warn: $this > 80
20
+ crit: $this > 90
21
+
22
+
23
+
24
+# find the rate memcached cache is filling
25
+
26
+template: cache_fill_rate
27
+ on: memcached.cache
28
+ lookup: max -1s at -30m unaligned of available
29
+ calc: ($this - $available) / ($now - $after)
30
+ every: 15s
31
+
32
+
33
+
34
+# find the hours remaining until memcached cache is full
35
+
36
+template: cache_full_after_hours
37
+ on: memcached.cache
38
+ calc: $available / $memcached_cache_fill_rate / 3600
39
+ every: 10s
40
+ warn: $this > 0 and $this < 48
41
+ crit: $this > 0 and $this < 24
conf.d/health.d/swap.conf
+1
-1
@@ -1,7 +1,7 @@
1
2
alarm: 30min_pcent_of_ram_swapped_out
3
on: system.swapio
4
- lookup: sum -30m unaligned of out
4
+ lookup: sum -30m unaligned absolute of out
5
# we have to convert KB to MB by dividing $this (i.e. the result of the lookup) with 1024
6
calc: $this / 1024 * 100 / ( $system.ram.used + $system.ram.cached + $system.ram.free )
7
every: 1m