ITL: Implement inverse switch for snmp_interface CheckCommand

As for Interface Monitoring it is sometime needed to inverse the status (down -> OK, up -> NOT OK).

Can be configured via snmp_interface_inverse variable (boolean).

fixes #115

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
This commit is contained in:
Tim Weippert 2016-12-29 11:53:27 +01:00 committed by Michael Friedrich
parent ae258f0eca
commit 2ac0c024cd
3 changed files with 5 additions and 0 deletions

View File

@ -120,6 +120,7 @@ Steve McMaster <mcmaster@hurricanelabs.com>
Thomas Gelf <thomas@gelf.net>
Thomas Widhalm <thomas.widhalm@icinga.com>
Tim Hardeck <thardeck@suse.de>
Tim Weippert <weiti@weiti.eu>
Timo Buhrmester <van.fstd@gmail.com>
Tobias Birnbaum <osterd@gmx.de>
Tobias von der Krone <tobias.vonderkrone@profitbricks.com>

View File

@ -1895,6 +1895,7 @@ snmp_privpass | **Required.** SNMP version 3 priv password. No val
snmp_warn | **Optional.** The warning threshold.
snmp_crit | **Optional.** The critical threshold.
snmp_interface | **Optional.** Network interface name. Default to regex "eth0".
snmp_interface_inverse | **Optional.** Inverse Interface check, down is ok. Defaults to false as it is missing.
snmp_interface_perf | **Optional.** Check the input/ouput bandwidth of the interface. Defaults to true.
snmp_interface_label | **Optional.** Add label before speed in output: in=, out=, errors-out=, etc.
snmp_interface_bits_bytes | **Optional.** Output performance data in bits/s or Bytes/s. **Depends** on snmp_interface_kbits set to true. Defaults to true.

View File

@ -183,6 +183,9 @@ object CheckCommand "snmp-interface" {
"-e" = {
set_if = "$snmp_interface_errors$"
}
"-i" = {
set_if = "$snmp_interface_inverse$"
}
"-r" = {
set_if = "$snmp_interface_noregexp$"
}