From 03b851460665de7b6cbb3ba9bdd4831d16577ad7 Mon Sep 17 00:00:00 2001 From: Dirk Goetz Date: Thu, 19 Nov 2015 12:26:06 +0100 Subject: [PATCH] Add a check command for check_breeze Add a check command for check_flexlm Add a check command for check_game refs #6225 --- doc/7-icinga-template-library.md | 45 ++++++++++++++ itl/command-plugins.conf | 101 +++++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+) diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md index 1434c65fa..bad493ba4 100644 --- a/doc/7-icinga-template-library.md +++ b/doc/7-icinga-template-library.md @@ -112,6 +112,20 @@ apt_critical | **Optional.** If the full package information of any o apt_timeout | **Optional.** Seconds before plugin times out (default: 10). +### breeze + +Check command object for the `check_breeze` plugin. + +Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): + +Name | Description +-----------------|--------------------------------- +breeze_hostname | **Required.** Name or IP address of host to check. Defaults to "$address$" if the host's `address` attribute is set, "$address6$" otherwise. +breeze_community | **Optional.** SNMPv1 community. Defaults to "public". +breeze_warning | **Required.** Percentage strength below which a WARNING status will result. Defaults to 50. +breeze_critical | **Required.** Percentage strength below which a WARNING status will result. Defaults to 20. + + ### by_ssh Check command object for the `check_by_ssh` plugin. @@ -311,6 +325,18 @@ file_age_critical_size | **Optional.** File must be at least this many bytes lon file_age_ignoremissing | **Optional.** Return OK if the file does not exist. Defaults to false. +### flexlm + +Check command object for the `check_flexlm` plugin. Requires the command `lmstat` installed. + +Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): + +Name | Description +-------------------|---------------------------------------------------------- +flexlm_licensefile | **Required.** Name of license file (usually license.dat). +flexlm_timeout | **Optional.** Plugin time out in seconds. Defaults to 15. + + ### fping4 Check command object for the `check_fping` plugin. @@ -383,6 +409,25 @@ ftp_ipv4 | **Optional.** Use IPv4 connection. Defaults to false. ftp_ipv6 | **Optional.** Use IPv6 connection. Defaults to false. +### game + +Check command object for the `check_game` plugin. Requires the command `qstat` (if installed from packages typically named `quakestat`) which also allows to provide some default configuration. + +Custom attributes passed as [command parameters](3-monitoring-basics.md#command-passing-parameters): + +Name | Description +-------------------|-------------- +game_game | **Required.** Name of the game. +game_ipaddress | **Required.** Ipaddress of the game server to query. +game_timeout | **Optional.** Seconds before connection times out. Defaults to 10. +game_port | **Optional.** Port to connect to. +game_gamefield | **Optional.** Field number in raw qstat output that contains game name. +game_mapfield | **Optional.** Field number in raw qstat output that contains map name. +game_pingfield | **Optional.** Field number in raw qstat output that contains ping time. +game_gametime | **Optional.** Field number in raw qstat output that contains game time. +game_hostname | **Optional.** Name of the host running the game. + + ### hostalive Check command object for the `check_ping` plugin with host check default values. This variant diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index cae729c03..9d703ae69 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -2153,3 +2153,104 @@ object CheckCommand "smart" { } } } + +object CheckCommand "breeze" { + import "plugin-check-command" + import "ipv4-or-ipv6" + + command = [ PluginDir + "/check_breeze" ] + + arguments = { + "-H" = { + value = "$breeze_hostname$" + description = "Name or IP address of host to check" + required = true + } + "-C" = { + value = "$breeze_community$" + description = "SNMPv1 community (default public)" + } + "-w" = { + value = "$breeze_warning$" + description = "Percentage strength below which a WARNING status will result" + required = true + } + "-c" = { + value = "$breeze_critical$" + description = "Percentage strength below which a CRITICAL status will result" + required = true + } + } + + vars.breeze_hostname = "$check_address$" + vars.breeze_warning = "50" + vars.breeze_critical = "20" +} + +object CheckCommand "flexlm" { + import "plugin-check-command" + + command = [ PluginDir + "/check_flexlm" ] + + arguments = { + "-F" = { + value = "$flexlm_licensefile$" + description = "Name of license file (usually license.dat)" + required = true + } + "-t" = { + value = "$flexlm_timeout$" + description = "Plugin time out in seconds (default = 15)" + } + } +} + +object CheckCommand "game" { + import "plugin-check-command" + import "ipv4-or-ipv6" + + command = [ PluginDir + "/check_game" ] + + arguments = { + "-P" = { + value = "$game_port$" + description = "Port to connect to" + } + "-t" = { + value = "$game_timeout$" + description = "Seconds before connection times out (default: 10)" + } + "-g" = { + value = "$game_gamefield$" + description = "Field number in raw qstat output that contains game name" + } + "-m" = { + value = "$game_mapfield$" + description = "Field number in raw qstat output that contains map name" + } + "-p" = { + value = "$game_pingfield$" + description = "Field number in raw qstat output that contains ping time" + } + "-G" = { + value = "$game_gametime$" + description = "Field number in raw qstat output that contains game time" + } + "-H" = { + value = "$game_hostname$" + description = "Name of the host running the game" + } + "game" = { + value = "$game_game$" + description = "Name of the game" + order = 1 + skip_key = true + } + "ipaddress" = { + value = "$game_ipaddress$" + description = "Ipaddress of the game server to query" + order = 2 + skip_key = true + } + } +} -- 2.40.0