mirror of https://github.com/Icinga/icinga2.git
Add new option `-a` to the `mem` CheckCommand (#9385)
* To the `mem` CheckCommand, add support for `check_mem.pl`'s new argument `-a` `-a Check AVAILABLE memory (only Linux)` * Update documentation for the CheckCommand `mem` to include the new `mem_available` option
This commit is contained in:
parent
ff6cdc2c71
commit
286e84bb56
|
@ -3493,13 +3493,14 @@ compared to thresholds. More details can be found on [this blog entry](http://sy
|
|||
|
||||
Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
|
||||
|
||||
Name | Description
|
||||
-------------|-----------------------------------------------------------------------------------------------------------------------
|
||||
mem_used | **Optional.** Tell the plugin to check for used memory in opposite of **mem_free**. Must specify one of these as true.
|
||||
mem_free | **Optional.** Tell the plugin to check for free memory in opposite of **mem_used**. Must specify one of these as true.
|
||||
mem_cache | **Optional.** If set to true, plugin will count cache as free memory. Defaults to false.
|
||||
mem_warning | **Required.** Specify the warning threshold as number interpreted as percent.
|
||||
mem_critical | **Required.** Specify the critical threshold as number interpreted as percent.
|
||||
Name | Description
|
||||
--------------|-----------------------------------------------------------------------------------------------------------------------
|
||||
mem_used | **Optional.** Tell the plugin to check for used memory to the exclusion of **mem_free** and **mem_available**. Must specify one of these as true.
|
||||
mem_free | **Optional.** Tell the plugin to check for free memory to the exclusion of **mem_used** and **mem_available**. Must specify one of these as true.
|
||||
mem_available | **Optional.** Tell the plugin to check available memory to the exclusion of **mem_free** and **mem_used**. Must specify one of these as true.
|
||||
mem_cache | **Optional.** If set to true, plugin will count cache as free memory. Defaults to false.
|
||||
mem_warning | **Required.** Specify the warning threshold as number interpreted as percent.
|
||||
mem_critical | **Required.** Specify the critical threshold as number interpreted as percent.
|
||||
|
||||
#### sar-perf <a id="plugin-contrib-command-sar-perf"></a>
|
||||
|
||||
|
|
|
@ -8,6 +8,10 @@ object CheckCommand "mem" {
|
|||
set_if = "$mem_used$"
|
||||
description = "Check USED memory"
|
||||
}
|
||||
"-a" = {
|
||||
set_if = "$mem_available$"
|
||||
description = "Check AVAILABLE memory"
|
||||
}
|
||||
"-f" = {
|
||||
set_if = "$mem_free$"
|
||||
description = "Check FREE memory"
|
||||
|
@ -28,6 +32,7 @@ object CheckCommand "mem" {
|
|||
|
||||
vars.mem_used = false
|
||||
vars.mem_free = false
|
||||
vars.mem_available = false
|
||||
vars.mem_cache = false
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue