From 2ce3fcc514ac56ef9da60e4a969b30a6da615b18 Mon Sep 17 00:00:00 2001 From: Stephan Tesch Date: Thu, 23 Feb 2017 17:18:18 +0000 Subject: [PATCH] Add --if-names option to check_interfaces 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 --- doc/10-icinga-template-library.md | 1 + itl/plugins-contrib.d/network-components.conf | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index e8345dad0..773e9a9ee 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -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. #### nwc_health diff --git a/itl/plugins-contrib.d/network-components.conf b/itl/plugins-contrib.d/network-components.conf index 0511704a6..1199df7dd 100644 --- a/itl/plugins-contrib.d/network-components.conf +++ b/itl/plugins-contrib.d/network-components.conf @@ -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$" -- 2.40.0