| 1 | # you can disable an alarm notification by setting the 'to' line to: silent |
| 2 | |
| 3 | template: btrfs_allocated |
| 4 | on: btrfs.disk |
| 5 | class: Utilization |
| 6 | type: System |
| 7 | component: File system |
| 8 | calc: 100 - ($unallocated * 100 / ($unallocated + $data_used + $data_free + $meta_used + $meta_free + $sys_used + $sys_free)) |
| 9 | units: % |
| 10 | every: 10s |
| 11 | warn: $this > (($status == $CRITICAL) ? (95) : (98)) |
| 12 | delay: up 1m down 15m multiplier 1.5 max 1h |
| 13 | summary: BTRFS allocated space utilization |
| 14 | info: Percentage of allocated BTRFS physical disk space |
| 15 | to: silent |
| 16 | |
| 17 | template: btrfs_data |
| 18 | on: btrfs.data |
| 19 | class: Utilization |
| 20 | type: System |
| 21 | component: File system |
| 22 | calc: $used * 100 / ($used + $free) |
| 23 | units: % |
| 24 | every: 10s |
| 25 | warn: $this > (($status >= $WARNING) ? (90) : (95)) && $btrfs_allocated > 98 |
| 26 | crit: $this > (($status == $CRITICAL) ? (95) : (98)) && $btrfs_allocated > 98 |
| 27 | delay: up 1m down 15m multiplier 1.5 max 1h |
| 28 | summary: BTRFS data space utilization |
| 29 | info: Utilization of BTRFS data space |
| 30 | to: sysadmin |
| 31 | |
| 32 | template: btrfs_metadata |
| 33 | on: btrfs.metadata |
| 34 | class: Utilization |
| 35 | type: System |
| 36 | component: File system |
| 37 | calc: ($used + $reserved) * 100 / ($used + $free + $reserved) |
| 38 | units: % |
| 39 | every: 10s |
| 40 | warn: $this > (($status >= $WARNING) ? (90) : (95)) && $btrfs_allocated > 98 |
| 41 | crit: $this > (($status == $CRITICAL) ? (95) : (98)) && $btrfs_allocated > 98 |
| 42 | delay: up 1m down 15m multiplier 1.5 max 1h |
| 43 | summary: BTRFS metadata space utilization |
| 44 | info: Utilization of BTRFS metadata space |
| 45 | to: sysadmin |
| 46 | |
| 47 | template: btrfs_system |
| 48 | on: btrfs.system |
| 49 | class: Utilization |
| 50 | type: System |
| 51 | component: File system |
| 52 | calc: $used * 100 / ($used + $free) |
| 53 | units: % |
| 54 | every: 10s |
| 55 | warn: $this > (($status >= $WARNING) ? (90) : (95)) && $btrfs_allocated > 98 |
| 56 | crit: $this > (($status == $CRITICAL) ? (95) : (98)) && $btrfs_allocated > 98 |
| 57 | delay: up 1m down 15m multiplier 1.5 max 1h |
| 58 | summary: BTRFS system space utilization |
| 59 | info: Utilization of BTRFS system space |
| 60 | to: sysadmin |
| 61 | |
| 62 | template: btrfs_device_read_errors |
| 63 | on: btrfs.device_errors |
| 64 | class: Errors |
| 65 | type: System |
| 66 | component: File system |
| 67 | units: errors |
| 68 | lookup: max -10m every 1m of read_errs |
| 69 | warn: $this > 0 |
| 70 | delay: up 1m down 15m multiplier 1.5 max 1h |
| 71 | summary: BTRFS device read errors |
| 72 | info: Number of encountered BTRFS read errors |
| 73 | to: sysadmin |
| 74 | |
| 75 | template: btrfs_device_write_errors |
| 76 | on: btrfs.device_errors |
| 77 | class: Errors |
| 78 | type: System |
| 79 | component: File system |
| 80 | units: errors |
| 81 | lookup: max -10m every 1m of write_errs |
| 82 | crit: $this > 0 |
| 83 | delay: up 1m down 15m multiplier 1.5 max 1h |
| 84 | summary: BTRFS device write errors |
| 85 | info: Number of encountered BTRFS write errors |
| 86 | to: sysadmin |
| 87 | |
| 88 | template: btrfs_device_flush_errors |
| 89 | on: btrfs.device_errors |
| 90 | class: Errors |
| 91 | type: System |
| 92 | component: File system |
| 93 | units: errors |
| 94 | lookup: max -10m every 1m of flush_errs |
| 95 | crit: $this > 0 |
| 96 | delay: up 1m down 15m multiplier 1.5 max 1h |
| 97 | summary: BTRFS device flush errors |
| 98 | info: Number of encountered BTRFS flush errors |
| 99 | to: sysadmin |
| 100 | |
| 101 | template: btrfs_device_corruption_errors |
| 102 | on: btrfs.device_errors |
| 103 | class: Errors |
| 104 | type: System |
| 105 | component: File system |
| 106 | units: errors |
| 107 | lookup: max -10m every 1m of corruption_errs |
| 108 | warn: $this > 0 |
| 109 | delay: up 1m down 15m multiplier 1.5 max 1h |
| 110 | summary: BTRFS device corruption errors |
| 111 | info: Number of encountered BTRFS corruption errors |
| 112 | to: sysadmin |
| 113 | |
| 114 | template: btrfs_device_generation_errors |
| 115 | on: btrfs.device_errors |
| 116 | class: Errors |
| 117 | type: System |
| 118 | component: File system |
| 119 | units: errors |
| 120 | lookup: max -10m every 1m of generation_errs |
| 121 | warn: $this > 0 |
| 122 | delay: up 1m down 15m multiplier 1.5 max 1h |
| 123 | summary: BTRFS device generation errors |
| 124 | info: Number of encountered BTRFS generation errors |
| 125 | to: sysadmin |