Merge pull request #7602 from MichalMMac/snmp-interface-extendedchecks

Add extended checks options to snmp-interface command template
This commit is contained in:
Michael Friedrich 2019-11-15 13:35:08 +01:00 committed by GitHub
commit 381c454d38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -2135,6 +2135,7 @@ snmp_interface_kbits | **Optional.** Make the warning and critical levels
snmp_interface_megabytes | **Optional.** Make the warning and critical levels in Mbps or MBps. **Depends** on snmp_interface_kbits set to true. Defaults to true.
snmp_interface_64bit | **Optional.** Use 64 bits counters instead of the standard counters when checking bandwidth & performance data for interface >= 1Gbps. Defaults to false.
snmp_interface_errors | **Optional.** Add error & discard to Perfparse output. Defaults to true.
snmp_interface_extended_checks | **Optional.** Also check the error and discard input/output. When enabled format of `snmp_warn` and `snmp_crit` changes to <In bytes>,<Out bytes>,<In error>,<Out error>,<In disc>,<Out disc>. More options available in the [snmp interface](http://nagios.manubulon.com/snmp_int.html) documentation. Defaults to false.
snmp_interface_noregexp | **Optional.** Do not use regexp to match interface name in description OID. Defaults to false.
snmp_interface_delta | **Optional.** Delta time of perfcheck. Defaults to "300" (5 min).
snmp_interface_warncrit_percent | **Optional.** Make the warning and critical levels in % of reported interface speed. If set, **snmp_interface_megabytes** needs to be set to false. Defaults to false.

View File

@ -263,6 +263,10 @@ object CheckCommand "snmp-interface" {
set_if = "$snmp_interface_errors$"
description = "Add error & discard to Perfparse output"
}
"-q" = {
set_if = "$snmp_interface_extended_checks$"
description = "Also check the error and discard input/output. When enabled format of snmp_warn and snmp_crit changes to <In bytes>,<Out bytes>,<In error>,<Out error>,<In disc>,<Out disc>"
}
"-i" = {
set_if = "$snmp_interface_inverse$"
description = "Make critical when up"
@ -303,6 +307,7 @@ object CheckCommand "snmp-interface" {
vars.snmp_interface_megabytes = true
vars.snmp_interface_64bit = false
vars.snmp_interface_errors = true
vars.snmp_interface_extended_checks = false
vars.snmp_interface_noregexp = false
vars.snmp_interface_delta = 300
vars.snmp_interface_warncrit_percent = false