Module: check_mk
Branch: master
Commit: 519cdaa36e23164c237e84dffe7ba73d44f6cdd5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=519cdaa36e2316…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Oct 19 15:56:45 2010 +0200
if/if64: Added expected interface speed to warning output
---
ChangeLog | 4 +++-
checks/if | 4 ++--
checks/if64 | 4 ++--
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index dd78e6e..dd1be88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
1.1.9i1
Checks & Agents:
- * megaraid_pdisks: Using the real enclosure number as check item now.
+ * megaraid_pdisks: Using the real enclosure number as check item now
+ * if/if64: Added expected interface speed to warning output
+
Multisite:
* The custom open/close states of custom links are now stored for each
user
diff --git a/checks/if b/checks/if
index 78d6ede..cf80459 100644
--- a/checks/if
+++ b/checks/if
@@ -102,7 +102,7 @@ def check_if(item, params, info):
operstatus = if_statename(str(ifOperStatus))
if not operstatus in allowed_operstates:
return (2, "CRIT - %soperstate: %s (CRIT)" % (infotext,
operstatus))
- infotext += "(%s) " % operstatus
+ infotext += "(%s) " % operstatus
state = 0
@@ -110,7 +110,7 @@ def check_if(item, params, info):
speed = saveint(ifSpeed)
bandwidth = speed / 8.0 # in Bytes / sec
if speed != targetspeed:
- infotext += "%s (wrong speed!)" % speed
+ infotext += "%s (wrong speed! expected: %s)" % (speed,
get_nic_speed_human_readable(targetspeed))
state = 1
else:
infotext += get_bytes_human_readable(speed, 1000)+'it/s'
diff --git a/checks/if64 b/checks/if64
index c9df3a4..897787b 100644
--- a/checks/if64
+++ b/checks/if64
@@ -114,7 +114,7 @@ def check_if64(item, params, info):
operstatus = if64_statename(str(ifOperStatus))
if not operstatus in allowed_operstates:
return (2, "CRIT - %soperstate: %s (CRIT)" % (infotext,
operstatus))
- infotext += "(%s) " % operstatus
+ infotext += "(%s) " % operstatus
state = 0
@@ -123,7 +123,7 @@ def check_if64(item, params, info):
infotext += get_nic_speed_human_readable(speed)
bandwidth = speed / 8.0 # in Bytes / sec
if speed != targetspeed:
- infotext += " (wrong speed!)"
+ infotext += " (wrong speed! expected: %s)" %
get_nic_speed_human_readable(targetspeed)
state = 1
# Performance counters