Module: check_mk
Branch: master
Commit: 98b47a195ea6d912684bc9bb409dde33aee66fb1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=98b47a195ea6d9…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Wed Jul 30 17:18:36 2014 +0200
Renamed the touchstone checks to docsis. But the checks a not finished yet
---
...stone_cable_modem_frequency => docsis_channels} | 2 +-
checkman/docsis_signal | 15 ++++++++++
checkman/touchstone_cable_modem_fec | 15 ----------
...stone_cable_modem_frequency => docsis_channels} | 16 +++++------
.../{touchstone_cable_modem_fec => docsis_signal} | 16 +++++------
web/plugins/wato/check_parameters.py | 30 ++++++++++----------
6 files changed, 47 insertions(+), 47 deletions(-)
diff --git a/checkman/touchstone_cable_modem_frequency b/checkman/docsis_channels
similarity index 85%
rename from checkman/touchstone_cable_modem_frequency
rename to checkman/docsis_channels
index 7d9c3f4..6686176 100644
--- a/checkman/touchstone_cable_modem_frequency
+++ b/checkman/docsis_channels
@@ -1,4 +1,4 @@
-title: Touchstone Cable Modem: Frequency
+title: DOCSIS: Frequency
agents: snmp
catalog: hw/network/arris
license: GPL
diff --git a/checkman/docsis_signal b/checkman/docsis_signal
new file mode 100644
index 0000000..7320252
--- /dev/null
+++ b/checkman/docsis_signal
@@ -0,0 +1,15 @@
+title: DOCSIS Signal: Forward error correction
+agents: snmp
+catalog: hw/network/docsis
+license: GPL
+distribution:
+description:
+ This check monitors the Forward Error correction rate on the docsis MIB. This works for
example for Touchstone Cable Modems
+ It is possible to set levels in percent for uncorrected and corrected packages.
+
+item:
+ None
+
+inventory:
+ One service will be created
+
diff --git a/checkman/touchstone_cable_modem_fec b/checkman/touchstone_cable_modem_fec
deleted file mode 100644
index 67183fa..0000000
--- a/checkman/touchstone_cable_modem_fec
+++ /dev/null
@@ -1,15 +0,0 @@
-title: Touchstone Cable Modem: Forward error correction
-agents: snmp
-catalog: hw/network/arris
-license: GPL
-distribution:
-description:
- This check monitors the Forward Error correction rate on Touchestone Cable Modems.
- It is possible to set levels in percent for uncorrected and corrected packages.
-
-item:
- None
-
-inventory:
- One service will be created
-
diff --git a/checks/touchstone_cable_modem_frequency b/checks/docsis_channels
similarity index 80%
rename from checks/touchstone_cable_modem_frequency
rename to checks/docsis_channels
index 2c3e1a1..030fa65 100644
--- a/checks/touchstone_cable_modem_frequency
+++ b/checks/docsis_channels
@@ -24,12 +24,12 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-touchstone_cable_modem_frequency_default_levels = ( 155, 163 )
+docsis_channels_default_levels = ( 155, 163 )
-def inventory_touchstone_cable_modem_frequency(info):
- return [ (None, "touchstone_cable_modem_frequency_default_levels") ]
+def inventory_docsis_channels(info):
+ return [ (None, "docsis_channels_default_levels") ]
-def check_touchstone_cable_modem_frequency(_no_item, params, info):
+def check_docsis_channels(_no_item, params, info):
mhz = int(info[0][0]) / 1000000
infotext = "Current Frequence is %d Mhz" % mhz
warn, crit = params
@@ -44,12 +44,12 @@ def check_touchstone_cable_modem_frequency(_no_item, params, info):
infotext += levels
return state, infotext, perfdata
-check_info["touchstone_cable_modem_frequency"] = {
- "check_function" : check_touchstone_cable_modem_frequency,
- "inventory_function" : inventory_touchstone_cable_modem_frequency,
+check_info["docsis_channels"] = {
+ "check_function" : check_docsis_channels,
+ "inventory_function" : inventory_docsis_channels,
"service_description" : "Frequency",
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0")
== ".1.3.6.1.4.1.4115.820.1.0.0.0.0.0",
"snmp_info" : ( ".1.3.6.1.2.1.10.127.1.1.1.1.2", [
3 ]),
- "group" : "network_freq_single",
+ "group" : "docsis_channels",
}
diff --git a/checks/touchstone_cable_modem_fec b/checks/docsis_signal
similarity index 83%
rename from checks/touchstone_cable_modem_fec
rename to checks/docsis_signal
index 14bad63..2547e9f 100644
--- a/checks/touchstone_cable_modem_fec
+++ b/checks/docsis_signal
@@ -24,15 +24,15 @@
# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA.
-factory_settings["touchstone_cable_modem_fec_default_levels"] = {
+factory_settings["docsis_signal_default_levels"] = {
"corrected" : ( 25.0 , 30.0 ),
"uncorrected" : ( 25.0 , 30.0 ),
}
-def inventory_touchstone_cable_modem_fec(info):
+def inventory_docsis_signal(info):
return [ (None, {}) ]
-def check_touchstone_cable_modem_fec(_no_item, params, info):
+def check_docsis_signal(_no_item, params, info):
fec = {}
good, fec['corrected'], fec['uncorrected'] = map(float, info[0])
fec['corrected_perc'] = ( fec['corrected'] / good ) * 100
@@ -48,13 +48,13 @@ def check_touchstone_cable_modem_fec(_no_item, params, info):
yield state, "FEC %s at %.2f%%" % ( what, fec[what+"_perc"]
), [ ( what, fec[what], warn, crit ) ]
yield 0, "Total: %d codewords" % good, [('total', good )]
-check_info["touchstone_cable_modem_fec"] = {
- "check_function" : check_touchstone_cable_modem_fec,
- "inventory_function" : inventory_touchstone_cable_modem_fec,
+check_info["docsis_signal"] = {
+ "check_function" : check_docsis_signal,
+ "inventory_function" : inventory_docsis_signal,
"service_description" : "FEC",
"snmp_scan_function" : lambda oid: oid(".1.3.6.1.2.1.1.2.0")
== ".1.3.6.1.4.1.4115.820.1.0.0.0.0.0",
"snmp_info" : ( ".1.3.6.1.2.1.10.127.1.1.4.1", [ 2,
3, 4 ]),
- "default_levels_variable" :
"touchstone_cable_modem_fec_default_levels",
- "group" : "fec",
+ "default_levels_variable" : "docsis_signal_default_levels",
+ "group" : "docsis_signal",
}
diff --git a/web/plugins/wato/check_parameters.py b/web/plugins/wato/check_parameters.py
index 3dbe574..65c9ba9 100644
--- a/web/plugins/wato/check_parameters.py
+++ b/web/plugins/wato/check_parameters.py
@@ -1317,8 +1317,8 @@ register_check_parameters(
register_check_parameters(
subgroup_networking,
- 'fec',
- _("Forward error correction"),
+ 'docsis_signal',
+ _("Forward error correction for Docsis Systems"),
Dictionary(
elements = [
( 'corrected', Tuple(
@@ -1343,6 +1343,19 @@ register_check_parameters(
register_check_parameters(
subgroup_networking,
+ "docsis_channels",
+ _("Modem Frequencies for Docsis"), # Name can be changed if the rule is
used for another check
+ Tuple(
+ help = _("Levels for the frequencies of network devices like modems."
),
+ elements = [
+ Integer(title = _("warning if at"), unit = "Mhz",
default_value = 155 ),
+ Integer(title = _("critical if at"), unit = "Mhz",
default_value = 163 ),
+ ]),
+ None,
+ "first"
+)
+register_check_parameters(
+ subgroup_networking,
"vpn_tunnel",
_("VPN Tunnel"),
Dictionary(
@@ -5502,19 +5515,6 @@ register_check_parameters(
"dict"
),
-register_check_parameters(
- subgroup_networking,
- "network_freq_single",
- _("Modem Frequencies"), # Name can be changed if the rule is used for
another check
- Tuple(
- help = _("Levels for the frequencies of network devices like modems."
),
- elements = [
- Integer(title = _("warning if at"), unit = "Mhz",
default_value = 155 ),
- Integer(title = _("critical if at"), unit = "Mhz",
default_value = 163 ),
- ]),
- None,
- "first"
-)
register_check_parameters(
subgroup_storage,