mirror of https://github.com/Icinga/icinga2.git
Add vars for all check_swap args
fixes #12392 Signed-off-by: Gunnar Beutner <gunnar.beutner@netways.de>
This commit is contained in:
parent
18efb2b665
commit
9517abba84
|
@ -1256,12 +1256,31 @@ object CheckCommand "swap" {
|
|||
command = [ PluginDir + "/check_swap" ]
|
||||
|
||||
arguments = {
|
||||
"-w" = "$swap_wfree$%"
|
||||
"-c" = "$swap_cfree$%"
|
||||
"-w" = {{
|
||||
if (macro("$swap_integer$")) {
|
||||
return macro("$swap_wfree$")
|
||||
} else {
|
||||
return macro("$swap_wfree$%")
|
||||
}
|
||||
}}
|
||||
"-c" = {{
|
||||
if (macro("$swap_integer$")) {
|
||||
return macro("$swap_cfree$")
|
||||
} else {
|
||||
return macro("$swap_cfree$%")
|
||||
}
|
||||
}}
|
||||
"-a" = {
|
||||
set_if = "$swap_allswaps$"
|
||||
}
|
||||
"-n" = "$swap_noswap$"
|
||||
}
|
||||
|
||||
vars.swap_wfree = 50
|
||||
vars.swap_cfree = 25
|
||||
vars.swap_wfree = "50%"
|
||||
vars.swap_cfree = "25%"
|
||||
vars.swap_integer = false
|
||||
vars.swap_allswaps = false
|
||||
vars.swap_noswap = "critical"
|
||||
}
|
||||
|
||||
object CheckCommand "load" {
|
||||
|
|
Loading…
Reference in New Issue