Module: check_mk
Branch: master
Commit: d295f6f3b7e2c111d5ac1da7c69402a471f2dbf1
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d295f6f3b7e2c1…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 25 17:08:19 2011 +0100
Updated bug entries
---
.bugs/128 | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/.bugs/128 b/.bugs/128
index c955f96..e093fa5 100644
--- a/.bugs/128
+++ b/.bugs/128
@@ -6,4 +6,6 @@ Cost: 4
Date: 2011-02-10 09:45:24
Class: bug
-After changing the trend_range to a larger time the check reports a peak value which is wrong. It might be needed to detect such a change and reset the values.
+After changing the trend_range to a larger time the check reports a peak
+value which is wrong. It might be needed to detect such a change and reset
+the values.
Module: check_mk
Branch: master
Commit: d52c3ade2babf64c02b1c6115ac24a810e5cf901
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=d52c3ade2babf6…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 25 15:51:23 2011 +0100
Added perf-o-meter for h3c_lanswitch_cpu
---
README.writing_checks | 4 +++-
web/plugins/perfometer/check_mk.py | 15 +++++++++++++++
2 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/README.writing_checks b/README.writing_checks
index 0e22d34..21771b0 100644
--- a/README.writing_checks
+++ b/README.writing_checks
@@ -134,7 +134,9 @@ Performance data:
graph in its current (and maybe future) forms. Those are in pnp-rraconf.
Use a symlink here.
-* pnp rra configuration
+* Each check that outputs performance data should have a perf-o-meter.
+ For checks part of Check_MK this must be done in web/plugins/perfometer/check_mk.py.
+ For third party checks this should be done in a separate file in web/plugins/perfometer.
SNMP based checks:
* Only use numeric OIDs in your checks. Name based OIDs rely on MIB files
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index 28deb9c..8f6e0cd 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -241,3 +241,18 @@ def perfometer_oracle_sessions(row, check_command, perf_data):
perfometers["check_mk-oracle_sessions"] = perfometer_oracle_sessions
perfometers["check_mk-oracle_logswitches"] = perfometer_oracle_sessions
+def perfometer_h3c_lanswitch_cpu(row, check_command, perf_data):
+ util = float(perf_data[0][1]) # is already percentage
+ warn = float(perf_data[0][3])
+ crit = float(perf_data[0][4])
+ if util < warn:
+ color = "#6f2"
+ elif util < crit:
+ color = "#9f2"
+ else:
+ color = "#cf2"
+
+ return "%.0f%%" % util, perfometer_linear(util, color)
+
+#perfometer_linear(perc, color)
+perfometers["check_mk-h3c_lanswitch_cpu"] = perfometer_h3c_lanswitch_cpu
Module: check_mk
Branch: master
Commit: 1d83f6081d2676961c4c004f11e57693b2816758
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1d83f6081d2676…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Feb 25 15:51:51 2011 +0100
Added perf-o-meter for h3c_lanswitch_cpu
---
README.writing_checks | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/README.writing_checks b/README.writing_checks
index 21771b0..b473704 100644
--- a/README.writing_checks
+++ b/README.writing_checks
@@ -59,8 +59,9 @@ Coding style
must return None as parameter and the check function must name
the parameter argument _no_params.
-* The name of the inventory and check function must be prefixed with the name of the check type, for example inventory_h3c_lanswitch_cpu
- for 'h3c_lanswitch'
+* The name of the inventory and check function must be
+ prefixed with the name of the check type, for example
+ inventory_h3c_lanswitch_cpu for 'h3c_lanswitch'
* Order of implementation: