From d7a2fec32a71f83d7d33a87d0d8b592bc614d95b Mon Sep 17 00:00:00 2001 From: Vladimir Vitkov <5081863+zeridon@users.noreply.github.com> Date: Tue, 29 Oct 2019 05:44:59 +0200 Subject: [PATCH] commands to tabs --- monitoring/icinga2/conf.d/commands-new.conf | 53 ++++++++++++++++----- 1 file changed, 41 insertions(+), 12 deletions(-) diff --git a/monitoring/icinga2/conf.d/commands-new.conf b/monitoring/icinga2/conf.d/commands-new.conf index 4e971c1..a18061b 100644 --- a/monitoring/icinga2/conf.d/commands-new.conf +++ b/monitoring/icinga2/conf.d/commands-new.conf @@ -1,19 +1,48 @@ object CheckCommand "check_net_int" { - import "by_ssh" - vars.by_ssh_timeout = "420" - timeout = "420" -# vars.by_ssh_command = "sudo /usr/lib64/nagios/plugins/check_net_int.sh -w $int_warn$ -c $int_crit$" - vars.by_ssh_command = "sudo /usr/lib/nagios/plugins/check_interface_load.sh -w 10000 -c 20000" - vars.int_warn="" - vars.int_crit="" + 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.int_warn="" + vars.int_crit="" } object CheckCommand "check_open_ports" { - import "by_ssh" - vars.by_ssh_timeout = "420" - timeout = "420" - vars.by_ssh_command = "sudo /usr/lib/nagios/plugins/check_network_ports.sh -p \"$ports$\" -H $host$" - vars.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.ports="" vars.host="" } +######################################################################################## +# OpenWRT APs +######################################################################################## +object CheckCommand "check_bandwidth" { + import "by_ssh" + vars.by_ssh_command = PluginDir + "/check_bandwidth.sh -i $interface$" + vars.by_ssh_timeout = "420" + timeout = "420" +} + +####################################################################################### +# VOC switches +####################################################################################### +object CheckCommand "check_operstatus" { + import "plugin-check-command" + command = PluginDir + "/check_snmp -H $host$ -C openfest --oid $OID$ -s $value$" + vars.host="" + vars.OID="" + vars.value="" + timeout = "120" +} + +object CheckCommand "check_operstatus_regex" { + import "plugin-check-command" + command = PluginDir + "/check_snmp -H $host$ -C openfest --oid $OID$ -r $value$" + vars.host="" + vars.OID="" + vars.value="" + timeout = "120" +}