]> granicus.if.org Git - icinga2/commitdiff
Add --if-names option to check_interfaces
authorStephan Tesch <stephan@tesch.cx>
Thu, 23 Feb 2017 17:18:18 +0000 (17:18 +0000)
committerGunnar Beutner <gunnar.beutner@icinga.com>
Tue, 28 Feb 2017 13:15:06 +0000 (14:15 +0100)
Sinve version 1.3 check_interfaces supports an option to query ifName instead
of ifDescr, which is helpful eg. FortiOS 5.4 devices.

fixes #5028
fixes #5032

Signed-off-by: Gunnar Beutner <gunnar.beutner@icinga.com>
doc/10-icinga-template-library.md
itl/plugins-contrib.d/network-components.conf

index e8345dad0a9b07e1367542e8e87d48da79c3d5a6..773e9a9ee403592cc3eda8a1f9d19d78c2cd296e 100644 (file)
@@ -2468,6 +2468,7 @@ interfaces_aliases        | **Optional.** Retrieves the interface description.
 interfaces_match_aliases  | **Optional.** Also match against aliases (Option --aliases automatically enabled).
 interfaces_timeout        | **Optional.** Sets the SNMP timeout (in ms).
 interfaces_sleep          | **Optional.** Sleep between every SNMP query (in ms).
+interfaces_names          | **Optional.** If set to true, use ifName instead of ifDescr.
 
 #### <a id="plugin-contrib-command-nwc_health"></a> nwc_health
 
index 0511704a6ffeef2ce28b1e54c5f5dfcb9c4011ae..1199df7dd1cbf6c217dbaa72aa9c8f69fff15390 100644 (file)
@@ -489,6 +489,10 @@ object CheckCommand "interfaces" {
                        value = "$interfaces_sleep$"
                        description = "Sleep between every SNMP query (in ms)."
                }
+                "--if-names" = {
+                        set_if = "$interfaces_names$"
+                        description = "Use ifName instead of ifDescr."
+                }
        }
 
        vars.interfaces_address = "$check_address$"