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="" }