On 01/12/15 23:49, Jay Newman wrote:

Hello, all.

To monitor network switches, I have some host configurations set up as below.

This approach is successful in providing the service checks for each interface as expected, but there are a few interfaces that I want to exclude from a service check because the OID is invalid (IE, no input/output error counters on a VLAN rather than a physical interface.)

Any suggestions on how to set up the “ignore” clause below so that it works?

object Host   "switch_1" {

import "generic-host"

address =  "10.1.1.1"

check_command = "check-host-alive"

vars.switch_make = "Cisco"

vars.switch_model = "Nexus 5000"

vars.interfaces["Ethernet1/1"] = {ifindex=436207616}

vars.interfaces["Ethernet1/2"] = {ifindex=436211712}

vars.interfaces["Ethernet1/3"] = {ifindex=436215808}

… many more …

}

apply Service "if_inerrors-" for (if_name => config in host.vars.interfaces) {

  import "generic-service"

check_command = "check_sw_snmp"

vars.cmdopts= "$address$ $oid$ "

display_name = if_name + " Input Errors"

vars.oid="iso.3.6.1.2.1.2.2.1.14." + config.ifindex

assign where host.vars.switch_model == "Nexus 6880"

assign where host.vars.switch_model == "Nexus 5000"

ignore where match (if_name,"VLAN")

}


You will need to define the vlan in the vars and then be able to define the exclude statement on the vlan. this means that each interface will have to have a vlan key/value pair to allow the identifier to be recognized by Icinga.

Regards,

Jay Newman



_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users


Assaf
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to