mirror of https://github.com/Icinga/icinga2.git
Add missing arguments for the "disk" check command
fixes #8316 Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
This commit is contained in:
parent
ac959a72aa
commit
bda2f87759
|
@ -375,6 +375,23 @@ disk_partition | **Optional.** The partition. **Deprecated in 2.3.**
|
||||||
disk_partition_excluded | **Optional.** The excluded partition. **Deprecated in 2.3.**
|
disk_partition_excluded | **Optional.** The excluded partition. **Deprecated in 2.3.**
|
||||||
disk_partitions | **Optional.** The partition(s). Multiple partitions must be defined as array.
|
disk_partitions | **Optional.** The partition(s). Multiple partitions must be defined as array.
|
||||||
disk_partitions_excluded | **Optional.** The excluded partition(s). Multiple partitions must be defined as array.
|
disk_partitions_excluded | **Optional.** The excluded partition(s). Multiple partitions must be defined as array.
|
||||||
|
disk_clear | **Optional.** Clear thresholds.
|
||||||
|
disk_exact_match | **Optional.** For paths or partitions specified with -p, only check for exact paths.
|
||||||
|
disk_errors_only | **Optional.** Display only devices/mountpoints with errors. May be true or false.
|
||||||
|
disk_group | **Optional.** Group paths. Thresholds apply to (free-)space of all partitions together
|
||||||
|
disk_kilobytes | **Optional.** Same as --units kB. May be true or false.
|
||||||
|
disk_local | **Optional.** Only check local filesystems. May be true or false.
|
||||||
|
disk_stat_remote_fs | **Optional.** Only check local filesystems against thresholds. Yet call stat on remote filesystems to test if they are accessible (e.g. to detect Stale NFS Handles). Myy be true or false
|
||||||
|
disk_mountpoint | **Optional.** Display the mountpoint instead of the partition. May be true or false.
|
||||||
|
disk_megabytes | **Optional.** Same as --units MB. May be true or false.
|
||||||
|
disk_all | **Optional.** Explicitly select all paths. This is equivalent to -R '.*'. May be true or false.
|
||||||
|
disk_eregi_path | **Optional.** Case insensitive regular expression for path/partition (may be repeated).
|
||||||
|
disk_ereg_path | **Optional.** Regular expression for path or partition (may be repeated).
|
||||||
|
disk_ignore_eregi_path | **Optional.** Regular expression to ignore selected path/partition (case insensitive) (may be repeated).
|
||||||
|
disk_ignore_ereg_path | **Optional.** Regular expression to ignore selected path or partition (may be repeated).
|
||||||
|
disk_timeout | **Optional.** Seconds before connection times out (default: 10).
|
||||||
|
disk_units | **Optional.** Choose bytes, kB, MB, GB, TB (default: MB).
|
||||||
|
disk_exclude_type | **Optional.** Ignore all filesystems of indicated type (may be repeated).
|
||||||
|
|
||||||
### <a id="plugin-check-command-users"></a> users
|
### <a id="plugin-check-command-users"></a> users
|
||||||
|
|
||||||
|
|
|
@ -409,24 +409,144 @@ object CheckCommand "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$"
|
}
|
||||||
|
|
||||||
|
"-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_partition$"
|
||||||
|
description = "Path or partition (may be repeated)"
|
||||||
|
repeat_key = true
|
||||||
|
}
|
||||||
|
|
||||||
"-p_old" = {
|
"-p_old" = {
|
||||||
key = "-p"
|
key = "-p"
|
||||||
value = "$disk_partition$"
|
value = "$disk_partition$"
|
||||||
}
|
}
|
||||||
"-x" = "$disk_partitions_excluded$"
|
|
||||||
|
"-x" = {
|
||||||
|
value = "$disk_partitions_excluded$"
|
||||||
|
description = "Ignore device (only works if -p unspecified)"
|
||||||
|
}
|
||||||
|
|
||||||
"-x_old" = {
|
"-x_old" = {
|
||||||
key = "-x"
|
key = "-x"
|
||||||
value = "$disk_partition_excluded$"
|
value = "$disk_partition_excluded$"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"-C" = {
|
||||||
|
set_if = "$disk_clear$"
|
||||||
|
description = "Clear thresholds"
|
||||||
|
}
|
||||||
|
|
||||||
|
"-E" = {
|
||||||
|
set_if = "$disk_exact_match$"
|
||||||
|
description = "For paths or partitions specified with -p, only check for exact paths"
|
||||||
|
}
|
||||||
|
|
||||||
|
"-e" = {
|
||||||
|
set_if = "$disk_errors_only$"
|
||||||
|
description = "Display only devices/mountpoints with errors"
|
||||||
|
}
|
||||||
|
|
||||||
|
"-g" = {
|
||||||
|
value = "$disk_group$"
|
||||||
|
description = "Group paths. Thresholds apply to (free-)space of all partitions together"
|
||||||
|
}
|
||||||
|
|
||||||
|
"-k" = {
|
||||||
|
set_if = "$disk_kilobytes$"
|
||||||
|
description = "Same as --units kB"
|
||||||
|
}
|
||||||
|
|
||||||
|
"-l" = {
|
||||||
|
set_if = "$disk_local$"
|
||||||
|
description = " Only check local filesystems"
|
||||||
|
}
|
||||||
|
|
||||||
|
"-L" = {
|
||||||
|
set_if = "$disk_stat_remote_fs$"
|
||||||
|
description = "Only check local filesystems against thresholds. Yet call stat on remote filesystems to test if they are accessible (e.g. to detect Stale NFS Handles)"
|
||||||
|
}
|
||||||
|
|
||||||
|
"-M" = {
|
||||||
|
set_if = "$disk_mountpoint$"
|
||||||
|
description = "Display the mountpoint instead of the partition"
|
||||||
|
}
|
||||||
|
|
||||||
|
"-m" = {
|
||||||
|
set_if = "$disk_megabytes$"
|
||||||
|
description = "Same as --units MB"
|
||||||
|
}
|
||||||
|
|
||||||
|
"-A" = {
|
||||||
|
set_if = "$disk_all$"
|
||||||
|
description = "Explicitly select all paths. This is equivalent to -R .*"
|
||||||
|
}
|
||||||
|
|
||||||
|
"-R" = {
|
||||||
|
value = "$disk_eregi_path$"
|
||||||
|
description = "Case insensitive regular expression for path/partition (may be repeated)"
|
||||||
|
repeat_key = true
|
||||||
|
}
|
||||||
|
|
||||||
|
"-r" = {
|
||||||
|
value = "$disk_ereg_path$"
|
||||||
|
description = "Regular expression for path or partition (may be repeated)"
|
||||||
|
repeat_key = true
|
||||||
|
}
|
||||||
|
|
||||||
|
"-I" = {
|
||||||
|
value = "$disk_ignore_eregi_path$"
|
||||||
|
description = "Regular expression to ignore selected path/partition (case insensitive) (may be repeated)"
|
||||||
|
repeat_key = true
|
||||||
|
}
|
||||||
|
|
||||||
|
"-i" = {
|
||||||
|
value = "$disk_ignore_ereg_path$"
|
||||||
|
description = "Regular expression to ignore selected path or partition (may be repeated)"
|
||||||
|
repeat_key = true
|
||||||
|
}
|
||||||
|
|
||||||
|
"-t" = {
|
||||||
|
value = "$disk_timeout$"
|
||||||
|
description = "Seconds before connection times out (default: 10)"
|
||||||
|
}
|
||||||
|
|
||||||
|
"-u" = {
|
||||||
|
value = "$disk_units$"
|
||||||
|
description = "Choose bytes, kB, MB, GB, TB (default: MB)"
|
||||||
|
}
|
||||||
|
|
||||||
|
"-X" = {
|
||||||
|
value = "$disk_exclude_type$"
|
||||||
|
description = "Ignore all filesystems of indicated type (may be repeated)"
|
||||||
|
repeat_key = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
vars.disk_wfree = 20
|
vars.disk_wfree = 20
|
||||||
vars.disk_cfree = 10
|
vars.disk_cfree = 10
|
||||||
|
vars.disk_megabytes = true
|
||||||
|
vars.disk_exclude_type = ["none", "tmpfs", "sysfs", "proc", "devtmpfs"]
|
||||||
}
|
}
|
||||||
|
|
||||||
object CheckCommand "users" {
|
object CheckCommand "users" {
|
||||||
|
|
Loading…
Reference in New Issue