command = [ PluginDir + "/check_disk" ]
arguments = {
- "-w" = "$disk_wfree$%"
- "-c" = "$disk_cfree$%"
- "-W" = "$disk_inode_wfree$%"
- "-K" = "$disk_inode_cfree$%"
- "-p" = "$disk_partitions$"
- "-x" = "$disk_partitions_excluded$"
+ "-w" = {
+ value = "$disk_wfree$"
+ description = "Exit with WARNING status if less than INTEGER units of disk are free or Exit with WARNING status if less than PERCENT of disk space is free"
+ required = true
+ }
+ "-c" = {
+ value = "$disk_cfree$"
+ description = "Exit with CRITICAL status if less than INTEGER units of disk are free or Exit with CRITCAL status if less than PERCENT of disk space is free"
+ required = true
+ }
+ "-W" = {
+ value = "$disk_inode_wfree$"
+ description = "Exit with WARNING status if less than PERCENT of inode space is free"
+ }
+ "-K" = {
+ value = "$disk_inode_cfree$"
+ description = "Exit with CRITICAL status if less than PERCENT of inode space is free"
+ }
+ "-p" = {
+ value = "$disk_partitions$"
+ description = "Path or partition (may be repeated)"
+ repeat_key = true
+ order = 1
+ }
+ "-x" = {
+ value = "$disk_partitions_excluded$"
+ description = "Ignore device (only works if -p unspecified)"
+ }
}
- vars.disk_wfree = 20
- vars.disk_cfree = 10
+ vars.disk_wfree = "20%"
+ vars.disk_cfree = "10%"
}
> **Note**
vars += config
- vars.disk_wfree = 10
- vars.disk_cfree = 5
+ vars.disk_wfree = "10%"
+ vars.disk_cfree = "5%"
}
Check command object for the `check_disk` plugin.
+> **Note**
+>
+> `disk_wfree` and `disk_cfree` require the percent sign compared to older versions.
+> If omitted, disk units can be used. This has been changed in **2.3.0**.
+
Custom Attributes:
Name | Description
------------------------|------------------------
-disk_wfree | **Optional.** The free space warning threshold in %. Defaults to 20.
-disk_cfree | **Optional.** The free space critical threshold in %. Defaults to 10.
+disk_wfree | **Optional.** The free space warning threshold. Defaults to "20%". If the percent sign is omitted, units from `disk_units` are used.
+disk_cfree | **Optional.** The free space critical threshold. Defaults to "10%". If the percent sign is omitted, units from `disk_units` are used.
disk_inode_wfree | **Optional.** The free inode warning threshold.
disk_inode_cfree | **Optional.** The free inode critical threshold.
disk_partition | **Optional.** The partition. **Deprecated in 2.3.**
}
}
- vars.disk_wfree = 20
- vars.disk_cfree = 10
+ vars.disk_wfree = "20%"
+ vars.disk_cfree = "10%"
vars.disk_megabytes = true
vars.disk_exclude_type = ["none", "tmpfs", "sysfs", "proc", "devtmpfs", "devfs", "mtmfs"]
}
command = [ PluginDir + "/check_disk" ]
arguments = {
- "-w" = "$disk_wfree$%"
- "-c" = "$disk_cfree$%"
- "-W" = "$disk_inode_wfree$%"
- "-K" = "$disk_inode_cfree$%"
- "-p" = "$disk_partitions$"
- "-x" = "$disk_partitions_excluded$"
+ "-w" = {
+ value = "$disk_wfree$"
+ description = "Exit with WARNING status if less than INTEGER units of disk are free or Exit with WARNING status if less than PERCENT of disk space is free"
+ required = true
+ }
+ "-c" = {
+ value = "$disk_cfree$"
+ description = "Exit with CRITICAL status if less than INTEGER units of disk are free or Exit with CRITCAL status if less than PERCENT of disk space is free"
+ required = true
+ }
+ "-W" = {
+ value = "$disk_inode_wfree$"
+ description = "Exit with WARNING status if less than PERCENT of inode space is free"
+ }
+ "-K" = {
+ value = "$disk_inode_cfree$"
+ description = "Exit with CRITICAL status if less than PERCENT of inode space is free"
+ }
+ "-p" = {
+ value = "$disk_partitions$"
+ description = "Path or partition (may be repeated)"
+ repeat_key = true
+ order = 1
+ }
+ "-x" = {
+ value = "$disk_partitions_excluded$"
+ description = "Ignore device (only works if -p unspecified)"
+ }
}
- vars.disk_wfree = 20
- vars.disk_cfree = 10
+ vars.disk_wfree = "20%"
+ vars.disk_cfree = "10%"
}
object Host "8063-my-server" {
vars += config
- vars.disk_wfree = 10
- vars.disk_cfree = 5
+ vars.disk_wfree = "10%"
+ vars.disk_cfree = "5%"
assign where host.vars.local_disks
}