Module: check_mk
Branch: master
Commit: 6ca864778d9e69d1fce246bf38d00ba2886cba6f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=6ca864778d9e69…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Wed Jan 29 16:29:40 2014 +0100
FIX if checks: port type 56 (fibrechannel) is no longer inventorized per default
Fibrechannel ports have their own checks, specifically written for them.
There is no need to inventorize them as if* services as well.
---
.werks/272 | 9 +++++++++
ChangeLog | 1 +
checks/hitachi_hnas_fc_if | 2 +-
checks/if.include | 5 ++++-
4 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/.werks/272 b/.werks/272
new file mode 100644
index 0000000..e4793e6
--- /dev/null
+++ b/.werks/272
@@ -0,0 +1,9 @@
+Title: if checks: port type 56 (fibrechannel) is no longer inventorized per default
+Level: 1
+Component: checks
+Version: 1.2.5i1
+Date: 1391009094
+Class: fix
+
+Fibrechannel ports have their own checks, specifically written for them.
+There is no need to inventorize them as if* services as well.
diff --git a/ChangeLog b/ChangeLog
index 4d99b37..fc6c0f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -147,6 +147,7 @@
* 0262 FIX: ps: Now able to skip disabled "Process Inventory" rules...
* 0264 FIX: printer_supply_ricoh: now reports correct filling levels...
* 0575 FIX: cmciii_lcp_airin, cmciii_lcp_airout, cmciii_lcp_waterin,
cmciii_lcp_waterout: improved handling of warning state...
+ * 0272 FIX: if checks: port type 56 (fibrechannel) is no longer inventorized per
default...
Multisite:
* 0371 Added log class filter to hostsvcevents view
diff --git a/checks/hitachi_hnas_fc_if b/checks/hitachi_hnas_fc_if
index f30ac6f..d1a66dc 100644
--- a/checks/hitachi_hnas_fc_if
+++ b/checks/hitachi_hnas_fc_if
@@ -31,7 +31,7 @@ def hitachi_hnas_fc_if_convert_info(info):
converted.append(map(str, [
"%d%03d" % (int(line[0]), int(line[1])), # ifIndex
line[0] + "." + line[1], # ifDescr (use
ClusterNode.InterfaceIndex)
- 56, # ifType 56 (fibreChannel)
+ "", # ifType: do not set
port type
int(line[3]) * 1000000000, # ifHighSpeed
line[2] == "1" and 1 or 2, # ifOperStatus (map
other states to down)
line[4], # ifHCInOctets
diff --git a/checks/if.include b/checks/if.include
index 9d7a50f..a915911 100644
--- a/checks/if.include
+++ b/checks/if.include
@@ -26,7 +26,7 @@
# Functions and definitions used by if and if64
-if_inventory_porttypes = [ '6', '32', '56', '62',
'117' ]
+if_inventory_porttypes = [ '6', '32', '62', '117' ]
if_inventory_portstates = [ '1' ]
if_inventory_uses_description = False
if_inventory_uses_alias = False
@@ -117,6 +117,9 @@ def inventory_if_common(info, has_nodeinfo = False):
porttypes = settings.get('porttypes', if_inventory_porttypes)
portstates = settings.get('portstates', if_inventory_portstates)
+ # Allow main check to set no port type (e.g. hitachi_hnas_fc_if)
+ porttypes.append("")
+
pre_inventory = []
pre_inventory_groups = []
group_patterns = {}