Check_nwc_health questions to interface checks

(Axel577) #1

Hey all!
I started to use the check_nwc_health plugin to monitor the interfaces of all of my cisco switches.
I configured:

  1. interface-status
  2. interface-errors
  3. interface-usage
    and that works fine!

My questions are:
To 1) There are switchports that are administratively disabled. At the moment, the plugin shows them as ‘critical’. Is it possible to show them as ‘OK’ ?

To 2) The interface errors are shown as errors per second. Is it possible to monitor the absolute value though?

To 3) Is it possible to change the units to Mbit/s for example? At the moment, they are shown as “bit/s”

Thank you very much!

(Axel577) #2

I got question 3) working.

Would be nice to get help for the other two.

   Emulate the negate plugin. --negate warning=critical --negate unknown=critical

Not that I know of, as this mode monitors the “error rate”. You will have to look at a different plugin, if they offer this function. Maybe check_snmp_interface or check_iftraffic does?

(Axel577) #4

Hi log1c,

I don’t understand what you mean with the “negate” switch?


You could use it like --negate critical=ok so that critical states for this check will be changed into an OK state.
But first check if this fits your check, or if there are other possibilities why this check can be critical.
Side question: Why monitor disabled ports?

(Axel577) #6

mmh I don’t get that because if there is really a port down the plugin would return “OK” ?

I thought I could easily work with apply rules:

apply Service “GigabitEthernet0/1 - Status” {
import “generic-service”
check_command = “check_nwc_health_2c”
vars.check_nwc_health_mode = “interface-status”
vars.check_nwc_health_name = “GigabitEthernet0/1”
assign where host.address && host.vars.groupdf8 == “IDF8” && == “Switch”

There are lot of switches that are same model (48 ports) so I thought I can use apply rules.
Without apply rules I need to crate a lot of object services for each switch, don’t I?


Yes, the use of --negate would change critical to ok for every check where it is configured.
But you have the possibility to override check variables on a host level, even when using apply rules.

In case you are using the Icinga Director this is fairly easy.
Pick the service check in Icinga Web 2, click on the “Modify” link under Actions and check the variables you want and hit Override vars.

On the config side it looks something like this:

object Host "SQL1" {
    import "windows-server"

    address = "..."
    vars["_override_servicevars"] += {
        "SQL-Jobs-Status" = {
            nrpe_timeout = "90"
        memory = {
            nrpe_arguments = [ "96", "99" ]
    vars.operatingssystem = "Windows Server 2016 Datacenter"
    vars.windows_disk_d = true