summaryrefslogtreecommitdiffstats
path: root/conf.d/health.d/btrfs.conf
blob: b27aa544fc9d189bdfe075c7caffb9d2441c4e47 (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
template: btrfs_allocated
      on: btrfs.disk
      os: *
   hosts: *
families: *
    calc: 100 - ($unallocated * 100 / ($unallocated + $data_used + $data_free + $meta_used + $meta_free + $sys_used + $sys_free))
   units: %
   every: 10s
    warn: $this > (($status >= $WARNING)  ? (90) : (95))
    crit: $this > (($status == $CRITICAL) ? (95) : (98))
   delay: up 1m down 15m multiplier 1.5 max 1h
    info: the percentage of allocated BTRFS physical disk space
      to: sysadmin

template: btrfs_data
      on: btrfs.data
      os: *
   hosts: *
families: *
    calc: $used * 100 / ($used + $free)
   units: %
   every: 10s
    warn: $this > (($status >= $WARNING)  ? (90) : (95)) && $btrfs_allocated > 98
    crit: $this > (($status == $CRITICAL) ? (95) : (98)) && $btrfs_allocated > 98
   delay: up 1m down 15m multiplier 1.5 max 1h
    info: the percentage of used BTRFS data space
      to: sysadmin

template: btrfs_metadata
      on: btrfs.metadata
      os: *
   hosts: *
families: *
    calc: ($used + $reserved) * 100 / ($used + $free + $reserved)
   units: %
   every: 10s
    warn: $this > (($status >= $WARNING)  ? (90) : (95)) && $btrfs_allocated > 98
    crit: $this > (($status == $CRITICAL) ? (95) : (98)) && $btrfs_allocated > 98
   delay: up 1m down 15m multiplier 1.5 max 1h
    info: the percentage of used BTRFS metadata space
      to: sysadmin

template: btrfs_system
      on: btrfs.system
      os: *
   hosts: *
families: *
    calc: $used * 100 / ($used + $free)
   units: %
   every: 10s
    warn: $this > (($status >= $WARNING)  ? (90) : (95)) && $btrfs_allocated > 98
    crit: $this > (($status == $CRITICAL) ? (95) : (98)) && $btrfs_allocated > 98
   delay: up 1m down 15m multiplier 1.5 max 1h
    info: the percentage of used BTRFS system space
      to: sysadmin