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" ]
|
command = [ PluginDir + "/check_disk" ]
|
||||||
|
|
||||||
arguments = {
|
arguments = {
|
||||||
"-w" = "$disk_wfree$%"
|
"-w" = {
|
||||||
"-c" = "$disk_cfree$%"
|
value = "$disk_wfree$"
|
||||||
"-W" = "$disk_inode_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"
|
||||||
"-K" = "$disk_inode_cfree$%"
|
required = true
|
||||||
"-p" = "$disk_partitions$"
|
}
|
||||||
"-x" = "$disk_partitions_excluded$"
|
"-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_wfree = "20%"
|
||||||
vars.disk_cfree = 10
|
vars.disk_cfree = "10%"
|
||||||
}
|
}
|
||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
|
@ -1098,8 +1120,8 @@ string values for passing multiple partitions to the `check_disk` check plugin.
|
||||||
|
|
||||||
vars += config
|
vars += config
|
||||||
|
|
||||||
vars.disk_wfree = 10
|
vars.disk_wfree = "10%"
|
||||||
vars.disk_cfree = 5
|
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.
|
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:
|
Custom Attributes:
|
||||||
|
|
||||||
Name | Description
|
Name | Description
|
||||||
------------------------|------------------------
|
------------------------|------------------------
|
||||||
disk_wfree | **Optional.** The free space warning threshold in %. Defaults to 20.
|
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 in %. Defaults to 10.
|
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_wfree | **Optional.** The free inode warning threshold.
|
||||||
disk_inode_cfree | **Optional.** The free inode critical threshold.
|
disk_inode_cfree | **Optional.** The free inode critical threshold.
|
||||||
disk_partition | **Optional.** The partition. **Deprecated in 2.3.**
|
disk_partition | **Optional.** The partition. **Deprecated in 2.3.**
|
||||||
|
|
|
@ -603,8 +603,8 @@ object CheckCommand "disk" {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vars.disk_wfree = 20
|
vars.disk_wfree = "20%"
|
||||||
vars.disk_cfree = 10
|
vars.disk_cfree = "10%"
|
||||||
vars.disk_megabytes = true
|
vars.disk_megabytes = true
|
||||||
vars.disk_exclude_type = ["none", "tmpfs", "sysfs", "proc", "devtmpfs", "devfs", "mtmfs"]
|
vars.disk_exclude_type = ["none", "tmpfs", "sysfs", "proc", "devtmpfs", "devfs", "mtmfs"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,16 +4,38 @@ object CheckCommand "8063-my-disk" {
|
||||||
command = [ PluginDir + "/check_disk" ]
|
command = [ PluginDir + "/check_disk" ]
|
||||||
|
|
||||||
arguments = {
|
arguments = {
|
||||||
"-w" = "$disk_wfree$%"
|
"-w" = {
|
||||||
"-c" = "$disk_cfree$%"
|
value = "$disk_wfree$"
|
||||||
"-W" = "$disk_inode_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"
|
||||||
"-K" = "$disk_inode_cfree$%"
|
required = true
|
||||||
"-p" = "$disk_partitions$"
|
}
|
||||||
"-x" = "$disk_partitions_excluded$"
|
"-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_wfree = "20%"
|
||||||
vars.disk_cfree = 10
|
vars.disk_cfree = "10%"
|
||||||
}
|
}
|
||||||
|
|
||||||
object Host "8063-my-server" {
|
object Host "8063-my-server" {
|
||||||
|
@ -37,8 +59,8 @@ apply Service "8063-" for (disk => config in host.vars.local_disks) {
|
||||||
|
|
||||||
vars += config
|
vars += config
|
||||||
|
|
||||||
vars.disk_wfree = 10
|
vars.disk_wfree = "10%"
|
||||||
vars.disk_cfree = 5
|
vars.disk_cfree = "5%"
|
||||||
|
|
||||||
assign where host.vars.local_disks
|
assign where host.vars.local_disks
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue