Icinga mit iftraffic64

(Lars Richter) #1

Hello everybody,

I have a problem with the check “iftraffic64”. I do not get it to run and so I just turn to the forum :slight_smile:

I have the following config::

object CheckCommand “check_iftraffic64” {
import “plugin-check-command”
command = [ PluginDir + “/check_iftraffic64.pl”]
arguments = {
“-H” = “$iftraffic64_address$”
“-i” = “$iftraffic64_interface$”
“-u” = “$iftraffic64_units$”
“-C” = “$iftraffic64_community$”
“-B” = “$iftraffic64_bandwidth$”

}
vars.iftraffic64_address = “$address$”
}
object Host “Cisco” {
display_name = “Cisco-3850”
address = “192.168.1.1”
check_command = “hostalive”
vars.ping_wrta = 5000
vars.ping_wpl = 100
vars.ping_crta = 5000
vars.ping_cpl = 100
vars.interfaces[“GigabitEthernet1/0/2”] = {
iftraffic64_units = “g”
iftraffic64_community = “public”
iftraffic64_bandwidth = 1
vlan = “internal”
qos = “disabled”
}
}
apply Service for (interface_name => interface_config in host.vars.interfaces) {
check_command = “check_iftraffic64”
display_name = “IF-” + interface_name
vars.iftraffic64_interface = interface_name
vars.iftraffic64_units = interface_config.iftraffic_units
vars.iftraffic64_community = interface_config.iftraffic_community
vars += interface_config
/* set a default value for units and bandwidth /
if (interface_config.iftraffic_units == “”) {
vars.iftraffic64_units = “m”
}
if (interface_config.iftraffic_bandwidth == “”) {
vars.iftraffic64_bandwidth = 1
}
if (interface_config.vlan == “”) {
vars.vlan = “not set”
}
if (interface_config.qos == “”) {
vars.qos = “not set”
}
/
set the global constant if not explicitely

  • not provided by the interfaces dictionary on the host
    */
    if (len(interface_config.iftraffic_community) == 0 || len(vars.iftraffic_community) == 0) {
    vars.iftraffic_community = IftrafficSnmpCommunity
    }
    }

As an error, I get the following in Icinga:

Missing (-I or -O) interface maximum speed!
Usage: check_iftraffic64.pl -H host [ -C community_string ] [ -i if_index

Unfortunately, I do not know where my mistake lies.

greetings

#2

To enable all viewers to participate please switch to English (explanation).

Edit: "-i" != "-I"