mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-26 23:24:09 +02:00
Add btrfs CheckCommand definition
Check a btrfs mountpoint health and disk space allocated
This commit is contained in:
parent
d17b403583
commit
16b0042791
@ -3106,6 +3106,22 @@ ceph_client_key | **Optional.** Ceph client keyring file.
|
|||||||
ceph_whitelist | **Optional.** Whitelist regexp for ceph health warnings.
|
ceph_whitelist | **Optional.** Whitelist regexp for ceph health warnings.
|
||||||
ceph_details | **Optional.** Run 'ceph health detail'.
|
ceph_details | **Optional.** Run 'ceph health detail'.
|
||||||
|
|
||||||
|
#### btrfs <a id="plugins-contrib-command-btrfs"></a>
|
||||||
|
|
||||||
|
The [btrfs plugin](https://github.com/knorrie/python-btrfs/)
|
||||||
|
is used to check the btrfs storage health on the server.
|
||||||
|
|
||||||
|
[monitoring-plugins-btrfs](https://packages.debian.org/monitoring-plugins-btrfs) provide the necessary binary on debian/ubuntu.
|
||||||
|
|
||||||
|
Custom attributes passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
|
||||||
|
|
||||||
|
Name | Description
|
||||||
|
-----------------|---------------------------------------------------------
|
||||||
|
btrfs_awg | **Optional.** Exit with WARNING status if less than the specified amount of disk space (in GiB) is unallocated
|
||||||
|
btrfs_acg | **Optional.** Exit with CRITICAL status if less than the specified amount of disk space (in GiB) is unallocated
|
||||||
|
btrfs_awp | **Optional.** Exit with WARNING status if more than the specified percent of disk space is allocated
|
||||||
|
btrfs_acp | **Optional.** Exit with CRITICAL status if more than the specified percent of disk space is allocated
|
||||||
|
btrfs_mountpoint | **Required.** Path to the BTRFS mountpoint
|
||||||
|
|
||||||
### Virtualization <a id="plugin-contrib-virtualization"></a>
|
### Virtualization <a id="plugin-contrib-virtualization"></a>
|
||||||
|
|
||||||
|
@ -102,3 +102,35 @@ object CheckCommand "ceph" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object CheckCommand "btrfs" {
|
||||||
|
import "plugin-check-command"
|
||||||
|
[ "sudo", PluginDir + "/check_btrfs" ]
|
||||||
|
|
||||||
|
arguments = {
|
||||||
|
"--allocated-warning-gib" = {
|
||||||
|
value = "$btrfs_awg$"
|
||||||
|
description = "Exit with WARNING status if less than the specified amount of disk space (in GiB) is unallocated"
|
||||||
|
}
|
||||||
|
"--allocated-critical-gib" = {
|
||||||
|
value = "$btrfs_acg$"
|
||||||
|
description = "Exit with CRITICAL status if less than the specified amount of disk space (in GiB) is unallocated"
|
||||||
|
}
|
||||||
|
"--allocated-warning-percent" = {
|
||||||
|
value = "$btrfs_awp$"
|
||||||
|
description = "Exit with WARNING status if more than the specified percent of disk space is allocated"
|
||||||
|
}
|
||||||
|
"--allocated-critical-percent" = {
|
||||||
|
value = "$btrfs_acp$"
|
||||||
|
description = "Exit with CRITICAL status if more than the specified percent of disk space is allocated"
|
||||||
|
}
|
||||||
|
"--mountpoint" = {
|
||||||
|
value = "$btrfs_mountpoint$"
|
||||||
|
description = "Path to the BTRFS mountpoint"
|
||||||
|
required = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
vars.btrfs_awp = 80
|
||||||
|
vars.btrfs_acp = 90
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user