From dc1cfab05236fc716d70eee9d0a4b388485dad8b Mon Sep 17 00:00:00 2001 From: Vladimir Vitkov <5081863+zeridon@users.noreply.github.com> Date: Tue, 29 Oct 2019 06:19:59 +0200 Subject: [PATCH] actually implement options properly --- monitoring/icinga2/conf.d/commands-new.conf | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/monitoring/icinga2/conf.d/commands-new.conf b/monitoring/icinga2/conf.d/commands-new.conf index a18061b..cc24662 100644 --- a/monitoring/icinga2/conf.d/commands-new.conf +++ b/monitoring/icinga2/conf.d/commands-new.conf @@ -2,7 +2,13 @@ object CheckCommand "check_net_int" { import "by_ssh" vars.by_ssh_timeout = "420" timeout = "420" - vars.by_ssh_command = PluginDir + "/check_interface_load.sh -w $int_warn$ -c $int_crit$ -o StrictHostKeyChecking=no" + vars.by_ssh_command = PluginDir + "/check_interface_load.sh -w $int_warn$ -c $int_crit$" + vars.by_ssh_options = [ + "StrictHostKeyChecking=no", + "ControlMaster=auto", + "ControlPath=/var/run/icinga2/$host.name$", + "ControlPersist=20m" + ] vars.int_warn="" vars.int_crit="" } @@ -11,7 +17,13 @@ object CheckCommand "check_open_ports" { import "by_ssh" vars.by_ssh_timeout = "420" timeout = "420" - vars.by_ssh_command = PluginDir + "/check_network_ports.sh -p \"$ports$\" -H $host$ -o StrictHostKeyChecking=no" + vars.by_ssh_command = PluginDir + "/check_network_ports.sh -p \"$ports$\" -H $host$" + vars.by_ssh_options = [ + "StrictHostKeyChecking=no", + "ControlMaster=auto", + "ControlPath=/var/run/icinga2/$host.name$", + "ControlPersist=20m" + ] vars.ports="" vars.host="" }