mirror of https://github.com/Icinga/icinga2.git
Fix check_disk default thresholds and document the change of unit
fixes #8673 Signed-off-by: Michael Friedrich <michael.friedrich@gmail.com>
This commit is contained in:
parent
a93cea04a4
commit
47b3ed948d
|
@ -1058,16 +1058,38 @@ can also be inherited from a parent template using additive inheritance (`+=`).
|
|||
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**
|
||||
|
@ -1098,8 +1120,8 @@ string values for passing multiple partitions to the `check_disk` check plugin.
|
|||
|
||||
vars += config
|
||||
|
||||
vars.disk_wfree = 10
|
||||
vars.disk_cfree = 5
|
||||
vars.disk_wfree = "10%"
|
||||
vars.disk_cfree = "5%"
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -129,12 +129,17 @@ dig_lookup | **Optional.** The address that should be looked up.
|
|||
|
||||
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.**
|
||||
|
|
|
@ -603,8 +603,8 @@ object CheckCommand "disk" {
|
|||
}
|
||||
}
|
||||
|
||||
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"]
|
||||
}
|
||||
|
|
|
@ -4,16 +4,38 @@ object CheckCommand "8063-my-disk" {
|
|||
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" {
|
||||
|
@ -37,8 +59,8 @@ apply Service "8063-" for (disk => config in host.vars.local_disks) {
|
|||
|
||||
vars += config
|
||||
|
||||
vars.disk_wfree = 10
|
||||
vars.disk_cfree = 5
|
||||
vars.disk_wfree = "10%"
|
||||
vars.disk_cfree = "5%"
|
||||
|
||||
assign where host.vars.local_disks
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue