ITL: Add CheckCommand ntp_peer

fixes #9523

Signed-off-by: Michael Friedrich <michael.friedrich@netways.de>
This commit is contained in:
Lennart Betz 2015-07-06 10:09:39 +02:00 committed by Michael Friedrich
parent 451992f0bb
commit 1a06333b86
2 changed files with 44 additions and 0 deletions

View File

@ -534,6 +534,27 @@ Name | Description
ntp_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise.
## <a id="plugin-check-command-ntp-peer"></a> ntp_peer
Check command object for the `check_ntp_peer` plugin.
Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters):
Name | Description
----------------|--------------
ntp_address | **Optional.** The host's address. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise.
ntp_port | **Optional.** The port to use. Default to 123.
ntp_warning | **Optional.** Offset to result in warning status (seconds).
ntp_critical | **Optional.** Offset to result in critical status (seconds).
ntp_wstratum | **Optional.** Warning threshold for stratum of server's synchronization peer.
ntp_cstratum | **Optional.** Critical threshold for stratum of server's synchronization peer.
ntp_wjitter | **Optional.** Warning threshold for jitter.
ntp_cjitter | **Optional.** Critical threshold for jitter.
ntp_wsource | **Optional.** Warning threshold for number of usable time sources.
ntp_csource | **Optional.** Critical threshold for number of usable time sources.
ntp_timeout | **Optional.** Seconds before connection times out (default: 10).
## <a id="plugin-check-command-passive"></a> passive
Specialised check command object for passive checks executing the `check_dummy` plugin with appropriate default values.

View File

@ -604,6 +604,29 @@ object CheckCommand "ntp_time" {
vars.ntp_address = "$check_address$"
}
object CheckCommand "ntp_peer" {
import "plugin-check-command"
import "ipv4-or-ipv6"
command = [ PluginDir + "/check_ntp_peer" ]
arguments = {
"-H" = "$ntp_address$"
"-p" = "$ntp_port$"
"-w" = "$ntp_warning$"
"-c" = "$ntp_critical$"
"-W" = "$ntp_wstratum$"
"-C" = "$ntp_cstratum$"
"-j" = "$ntp_wjitter$"
"-k" = "$ntp_cjitter$"
"-m" = "$ntp_wsource$"
"-n" = "$ntp_csource$"
"-t" = "$ntp_timeout$"
}
vars.ntp_address = "$check_address$"
}
object CheckCommand "ssh" {
import "plugin-check-command"
import "ipv4-or-ipv6"