Module: check_mk
Branch: master
Commit: 0b6ce79f876857917149c673ca1e3e5cae67ec0d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0b6ce79f876857…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Oct 10 17:39:44 2013 +0200
cpu_netapp: added Perf-O-Meter and PNP template
---
ChangeLog | 1 +
pnp-templates/check_mk-netapp_cpu.php | 1 +
web/plugins/perfometer/check_mk.py | 9 +--------
3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 02e9234..55667a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@
* if/if64 and friends: add 95% percentiles to graphs
* services: inventory now also matches against display names of services
* esx_vsphere_hostsystem.multipath: now able to set warn/crit levels
+ * cpu_netapp: added Perf-O-Meter and PNP template
* FIX: windows_agent: fixed bug in cleanup of open thread handles
* FIX: cups default printer is now monitored again in linux agent
* FIX: host notification email in html format: fixed formating error
diff --git a/pnp-templates/check_mk-netapp_cpu.php
b/pnp-templates/check_mk-netapp_cpu.php
new file mode 120000
index 0000000..07c1c09
--- /dev/null
+++ b/pnp-templates/check_mk-netapp_cpu.php
@@ -0,0 +1 @@
+check_mk-h3c_lanswitch_cpu.php
\ No newline at end of file
diff --git a/web/plugins/perfometer/check_mk.py b/web/plugins/perfometer/check_mk.py
index af3a3f7..53f12b7 100644
--- a/web/plugins/perfometer/check_mk.py
+++ b/web/plugins/perfometer/check_mk.py
@@ -396,19 +396,12 @@ perfometers["check_mk-oracle_logswitches"] =
perfometer_oracle_sessions
def perfometer_cpu_utilization(row, check_command, perf_data):
util = float(perf_data[0][1]) # is already percentage
color = "#cf2"
- if perf_data[0][3]:
- warn = float(perf_data[0][3])
- crit = float(perf_data[0][4])
- if util < warn:
- color = "#6f2"
- elif util < crit:
- color = "#9f2"
-
return "%.0f%%" % util, perfometer_linear(util, color)
#perfometer_linear(perc, color)
perfometers["check_mk-h3c_lanswitch_cpu"] = perfometer_cpu_utilization
perfometers["check_mk-winperf_processor.util"] = perfometer_cpu_utilization
+perfometers["check_mk-netapp_cpu"] = perfometer_cpu_utilization
def perfometer_ps_perf(row, check_command, perf_data):
perf_dict = dict([(p[0], float(p[1])) for p in perf_data])