summaryrefslogtreecommitdiffstats
path: root/conf.d/health.d/disks.conf
blob: c38f1a0a03588fc10f142b9c3ac89a70f3ae9647 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# -----------------------------------------------------------------------------
# low disk space

# checking the latest collected values
# raise an alarm if the disk is low on
# available disk space

template: disk_full_percent
      on: disk.space
    calc: $used * 100 / ($avail + $used)
   every: 1m
    warn: $this > 80
    crit: $this > 95
   units: %
    info: current disk space usage


# -----------------------------------------------------------------------------
# disk fill rate

# calculate the rate the disk fills
# use as base, the available space change
# during the last 30 minutes

# this is just a calculation - it has no alarm
# we will use it in the next template to find
# the hours remaining

template: disk_fill_rate
      on: disk.space
  lookup: max -1s at -30m unaligned of avail
    calc: ($this - $avail) / ($now - $after)
   every: 15s
   units: MB/s
    info: average rate the disk fills up (positive), or frees up (negative) space, for the last 30 minutes


# calculate the hours remaining
# if the disk continues to fill
# in this rate

template: disk_full_after_hours
      on: disk.space
    calc: $avail / $disk_fill_rate / 3600
   every: 10s
    warn: $this > 0 and $this < 48
    crit: $this > 0 and $this < 24
   units: hours
    info: estimated time the disk will run out of space, if the system continues to add data with the rate of the last 30 minutes


# -----------------------------------------------------------------------------
# disk congestion

# raise an alarm if the disk is congested
# by calculating the average disk utilization
# for the last 10 minutes

template: 10min_disk_utilization
      on: disk.util
  lookup: average -10m unaligned
   every: 1m
   green: 90
     red: 98
    warn: $this > $green
    crit: $this > $red
   units: %
    info: the percentage of time the disk was busy, during the last 10 minutes


# raise an alarm if the disk backlog
# is above 1000ms (1s) per second
# for 10 minutes
# (i.e. the disk cannot catch up)

template: 10min_disk_backlog
      on: disk.backlog
  lookup: average -10m unaligned
   every: 1m
   green: 1000
     red: 2000
    warn: $this > $green
    crit: $this > $red
   units: ms
    info: average of the kernel estimated disk backlog, for the last 10 minutes