From ae95918da014bf9a0e190d892f40415e0fbb6396 Mon Sep 17 00:00:00 2001 From: Steve McMaster Date: Thu, 11 Dec 2014 16:16:58 -0500 Subject: [PATCH] Add -t options to "snmp" and "snmp-manubulon-command" CheckCommand objects fixes #8075 Signed-off-by: Gunnar Beutner --- doc/7-configuring-icinga-2.md | 6 ++++++ itl/command-plugins-manubulon.conf | 2 ++ itl/command-plugins.conf | 2 ++ 3 files changed, 10 insertions(+) diff --git a/doc/7-configuring-icinga-2.md b/doc/7-configuring-icinga-2.md index 839433f5a..00507e1ae 100644 --- a/doc/7-configuring-icinga-2.md +++ b/doc/7-configuring-icinga-2.md @@ -2307,6 +2307,7 @@ snmp_eregi | **Optional.** Return OK state if case-insensitive extended snmp_label | **Optional.** Prefix label for output value snmp_invert_search | **Optional.** Invert search result and return CRITICAL state if found snmp_units | **Optional.** Units label(s) for output value (e.g., 'sec.'). +snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 10 seconds. #### snmpv3 @@ -2524,6 +2525,7 @@ snmp_warn | **Optional.** The warning threshold. Change the `snmp_ snmp_crit | **Optional.** The critical threshold. Change the `snmp_load_type` var to "netsl" for using 3 values. snmp_load_type | **Optional.** Load type. Defaults to "stand". Check all available types in the [snmp load](http://nagios.manubulon.com/snmp_load.html) documentation. snmp_perf | **Optional.** Enable perfdata values. Defaults to "true". +snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 5 seconds. #### snmp-memory @@ -2547,6 +2549,7 @@ snmp_privpass | **Required.** SNMP version 3 priv password. No value d snmp_warn | **Optional.** The warning threshold. snmp_crit | **Optional.** The critical threshold. snmp_perf | **Optional.** Enable perfdata values. Defaults to "true". +snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 5 seconds. #### snmp-storage @@ -2571,6 +2574,7 @@ snmp_warn | **Optional.** The warning threshold. snmp_crit | **Optional.** The critical threshold. snmp_storage_name | **Optional.** Storage name. Default to regex "^/$$". More options available in the [snmp storage](http://nagios.manubulon.com/snmp_storage.html) documentation. snmp_perf | **Optional.** Enable perfdata values. Defaults to "true". +snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 5 seconds. #### snmp-interface @@ -2606,6 +2610,7 @@ snmp_interface_noregexp | **Optional.** Do not use regexp to match interface snmp_interface_delta | **Optional.** Delta time of perfcheck. Defaults to "300" (5 min). snmp_warncrit_percent | **Optional.** Make the warning and critical levels in % of reported interface speed. If set **snmp_interface_megabytes** needs to be set to "false". Defaults to "false". snmp_perf | **Optional.** Enable perfdata values. Defaults to "true". +snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 5 seconds. #### snmp-process @@ -2630,3 +2635,4 @@ snmp_warn | **Optional.** The warning threshold. snmp_crit | **Optional.** The critical threshold. snmp_process_name | **Optional.** Name of the process (regexp). No trailing slash!. Defaults to ".*". snmp_perf | **Optional.** Enable perfdata values. Defaults to "true". +snmp_timeout | **Optional.** The command timeout in seconds. Defaults to 5 seconds. diff --git a/itl/command-plugins-manubulon.conf b/itl/command-plugins-manubulon.conf index 58cba07b4..7d0d9e3da 100644 --- a/itl/command-plugins-manubulon.conf +++ b/itl/command-plugins-manubulon.conf @@ -53,6 +53,7 @@ template CheckCommand "snmp-manubulon-command" { "-w" = "$snmp_warn$" "-c" = "$snmp_crit$" + "-t" = "$snmp_timeout$" } vars.snmp_address = "$address$" @@ -64,6 +65,7 @@ template CheckCommand "snmp-manubulon-command" { vars.snmp_v3_use_privpass = false vars.snmp_v3_use_authprotocol = false vars.snmp_authprotocol = "md5,des" + vars.snmp_timeout = "5" } diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf index 589b049ff..80e4c57fd 100644 --- a/itl/command-plugins.conf +++ b/itl/command-plugins.conf @@ -567,6 +567,7 @@ object CheckCommand "snmp" { "-R" = "$snmp_eregi$" "-l" = "$snmp_label$" "-u" = "$snmp_units$" + "-t" = "$snmp_timeout$" "--invert-search" = { set_if = "$snmp_invert_search$" description = "Invert search result and return CRITICAL if found" @@ -576,6 +577,7 @@ object CheckCommand "snmp" { vars.snmp_address = "$address$" vars.snmp_community = "public" vars.snmp_invert_search = false + vars.snmp_timeout = "10" } object CheckCommand "snmpv3" {