mirror of https://github.com/Icinga/icinga2.git
Adding check_uptime to itl
This commit is contained in:
parent
8c739fe33b
commit
0e00ffee39
|
@ -1485,6 +1485,21 @@ users_wgreater | **Optional.** The user count warning threshold. Defaults to 20
|
|||
users_cgreater | **Optional.** The user count critical threshold. Defaults to 50.
|
||||
|
||||
|
||||
### uptime <a id="plugin-check-command-uptime"></a>
|
||||
|
||||
The [check_uptime](https://www.monitoring-plugins.org/doc/man/check_uptime.html) plugin
|
||||
checks the uptime of the system using /proc/uptime.
|
||||
|
||||
Custom variables passed as [command parameters](03-monitoring-basics.md#command-passing-parameters):
|
||||
|
||||
Name | Description
|
||||
----------------|--------------
|
||||
uptime_warning | **Required.** Min. number of uptime to generate warning (-w 30m). Defaults to 30m.
|
||||
uptime_critical | **Required.** Min. number of uptime to generate critical alert (-c 15m). Defaults to 15m.
|
||||
uptime_for | **Optional.** Show uptime in a pretty format (Running for x weeks, x days, ...). Defaults to false.
|
||||
uptime_since | **Optional.** Show last boot in yyyy-mm-dd HH:MM:SS format (output from 'uptime -s'). Defaults to false.
|
||||
|
||||
|
||||
|
||||
## Windows Plugins for Icinga 2 <a id="windows-plugins"></a>
|
||||
|
||||
|
|
|
@ -3140,3 +3140,32 @@ object CheckCommand "rpc" {
|
|||
|
||||
vars.rpc_address = "$check_address$"
|
||||
}
|
||||
|
||||
object CheckCommand "uptime" {
|
||||
command = [ PluginDir + "/check_uptime" ]
|
||||
|
||||
arguments = {
|
||||
"--warning" = {
|
||||
value = "$uptime_warning$"
|
||||
description = "Min. number of uptime to generate warning"
|
||||
required = true
|
||||
}
|
||||
"--critical" = {
|
||||
value = "$uptime_critical$"
|
||||
description = "Min. number of uptime to generate critical alert ( w < c )"
|
||||
required = true
|
||||
}
|
||||
"--for" = {
|
||||
set_if = "$uptime_for$"
|
||||
description = "Show uptime in a pretty format (Running for x weeks, x days, ...)"
|
||||
}
|
||||
"--since" = {
|
||||
set_if = "$uptime_since$"
|
||||
description = "Show last boot in yyyy-mm-dd HH:MM:SS format (output from 'uptime -s')"
|
||||
}
|
||||
}
|
||||
|
||||
vars.uptime_warning = "30m"
|
||||
vars.uptime_critical = "15m"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue