Module: check_mk
Branch: master
Commit: 7d8c5f6b5341a739ec105ad8759e96af0428bedc
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7d8c5f6b5341a7…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Aug 1 15:21:07 2014 +0200
#1070 printer_input/printer_output: New checks to monitor input/output sub-units of printers
These checks are meant to check whether or not there is enough paper in the input slots
and/or enough space in the output slots.
---
.werks/1070 | 10 ++
ChangeLog | 1 +
checkman/printer_input | 27 ++++++
checkman/printer_output | 27 ++++++
checks/printer_io | 168 ++++++++++++++++++++++++++++++++++
web/plugins/wato/check_parameters.py | 48 +++++++++-
6 files changed, 280 insertions(+), 1 deletion(-)
Diff: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=7d8c5f6b53…
Module: check_mk
Branch: master
Commit: 67af7971b11dfe877b2afe5880a74d6296161c20
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=67af7971b11dfe…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Fri Aug 1 11:14:44 2014 +0200
docsis_signal_quality: Added Signal Noise
---
checkman/docsis_channels_downstream | 4 ++--
checkman/docsis_signal_quality | 10 ++++++----
checks/docsis_signal_quality | 19 ++++++++++++++++++-
web/plugins/wato/check_parameters.py | 9 ++++++++-
4 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/checkman/docsis_channels_downstream b/checkman/docsis_channels_downstream
index 407e686..dd4a83e 100644
--- a/checkman/docsis_channels_downstream
+++ b/checkman/docsis_channels_downstream
@@ -7,8 +7,8 @@ description:
This check monitors currently only montiors the frequency for each channel in Mhz. Additional information are available but not yet implemented.
item:
- None
+ Channel ID
inventory:
- One service will be created
+ One service will be created for each channel
diff --git a/checkman/docsis_signal_quality b/checkman/docsis_signal_quality
index 2a6f2aa..2c5eedd 100644
--- a/checkman/docsis_signal_quality
+++ b/checkman/docsis_signal_quality
@@ -4,12 +4,14 @@ catalog: hw/network/docsis
license: GPL
distribution:
description:
- This check monitors the Forward Error correction rate on the docsis MIB.
- It is possible to set levels in percent for uncorrected and corrected packages.
+ This check monitors the Singal Quality. This includes
+ the Forward Error correction, and the Signal Noise.
+ It is possible to set levels in percent for uncorrected and corrected packages (FEC) and
+ levels for the Signal Quality in dB.
item:
- None
+ Channel ID like reported in SNMP Output
inventory:
- One service will be created
+ One service will be created for each Channel
diff --git a/checks/docsis_signal_quality b/checks/docsis_signal_quality
index 8f57ef4..6937c4e 100644
--- a/checks/docsis_signal_quality
+++ b/checks/docsis_signal_quality
@@ -36,6 +36,7 @@
factory_settings["docsis_signal_quality_default_levels"] = {
"corrected" : ( 25.0 , 30.0 ),
"uncorrected" : ( 25.0 , 30.0 ),
+ "signal_noise" : ( 50, 60 ), #dB
}
def inventory_docsis_signal_quality(info):
@@ -44,8 +45,23 @@ def inventory_docsis_signal_quality(info):
yield line[0], {}
def check_docsis_signal_quality( item, params, info):
- for entry, good, corrected, uncorrected in info:
+ for entry, good, corrected, uncorrected, signal_noise in info:
if entry == item:
+ # Signal Noise
+ noise_db = float(signal_noise) / 10
+ infotext = "Noise: %.2f dB" % noise_db
+ warn, crit = params['signal_noise']
+ levels = " (Warn/Crit at %s dB/ %s dB)" % ( warn, crit )
+ state = 0
+ if noise_db >= crit:
+ state = 2
+ infotext += levels
+ elif noise_db >= warn:
+ state = 2
+ infotext += levels
+ yield state, infotext, [ ('signal_noise', noise_db, warn, crit ) ]
+
+ # FEC
fec = {}
good, fec['corrected'], fec['uncorrected'] = map(float, [ good, corrected, uncorrected ])
fec['corrected_perc'] = ( fec['corrected'] / good ) * 100
@@ -73,6 +89,7 @@ check_info["docsis_signal_quality"] = {
2, #docsIfSigQUnerroreds
3, #docsIfSigQCorrecteds
4, #docsIfSigQUnerroreds
+ 5, #docsIfSigQSignalNoise
]),
"default_levels_variable" : "docsis_signal_quality_default_levels",
"group" : "docsis_signal_quality",
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index c5082a0..ba2a544 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -1318,9 +1318,16 @@ register_check_parameters(
register_check_parameters(
subgroup_networking,
'docsis_signal_quality',
- _("Docsis Forward error correction"),
+ _("Docsis Singal Quality"),
Dictionary(
elements = [
+ ( 'signal_noise', Tuple(
+ title = _("Levels for Signal Noise"),
+ elements = [
+ Integer( title = _("Warning at"), unit = "dB", default_value = 50),
+ Integer( title = _("Critical at"), unit = "dB", default_value = 60 ),
+ ]
+ )),
( 'corrected', Tuple(
title = _("Levels for corrected Packages"),
elements = [