Module: check_mk
Branch: master
Commit: fb839a0878ae07459092f3c69dc731ba994b0c66
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fb839a0878ae07…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Mon Jun 1 10:38:05 2015 +0200
winperf.cpuusage: add formalization for new graph template
---
pnp-templates/check_mk-winperf.cpuusage.php | 33 ---------------------------
web/plugins/metrics/check_mk.py | 12 ++++++++++
2 files changed, 12 insertions(+), 33 deletions(-)
diff --git a/pnp-templates/check_mk-winperf.cpuusage.php
b/pnp-templates/check_mk-winperf.cpuusage.php
deleted file mode 100644
index dd7dbfb..0000000
--- a/pnp-templates/check_mk-winperf.cpuusage.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-# +------------------------------------------------------------------+
-# | ____ _ _ __ __ _ __ |
-# | / ___| |__ ___ ___| | __ | \/ | |/ / |
-# | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
-# | | |___| | | | __/ (__| < | | | | . \ |
-# | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
-# | |
-# | Copyright Mathias Kettner 2014 mk(a)mathias-kettner.de |
-# +------------------------------------------------------------------+
-#
-# This file is part of Check_MK.
-# The official homepage is at
http://mathias-kettner.de/check_mk.
-#
-# check_mk is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation in version 2. check_mk is distributed
-# in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
-# out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE. See the GNU General Public License for more de-
-# ails. You should have received a copy of the GNU General Public
-# License along with GNU Make; see the file COPYING. If not, write
-# to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
-# Boston, MA 02110-1301 USA.
-
-
-$opt[1] = "--vertical-label 'Percent' -l0 -u100 --title \"CPU
Utilization of $hostname\" ";
-
-$def[1] = "DEF:usage=$RRDFILE[1]:$DS[1]:AVERAGE ";
-$def[1] .= "AREA:usage#60f020:\"CPU utilization\" ";
-$def[1] .= "LINE:usage#40d010 ";
-
-?>
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index 9029d9a..92608cd 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -1283,6 +1283,7 @@ check_metrics["check_mk-lparstat_aix.cpu_util"]
= { "wait" : { "
check_metrics["check_mk-ucd_cpu_util"] = {
"wait" : { "name" : "io_wait" } }
check_metrics["check_mk-vms_cpu"] = {
"wait" : { "name" : "io_wait" } }
check_metrics["check_mk-vms_sys.util"] = {
"wait" : { "name" : "io_wait" } }
+check_metrics["check_mk-winperf.cpuusage"] = {
"cpuusage" : { "name" : "util" } }
check_metrics["check_mk-mbg_lantime_state"] = {
"offset" : { "name" : "time_offset", "scale" :
0.000001 }} # convert us -> sec
check_metrics["check_mk-mbg_lantime_ng_state"] = {
"offset" : { "name" : "time_offset", "scale" :
0.000001 }} # convert us -> sec
@@ -1616,6 +1617,17 @@ graph_info.append({
]
})
+graph_info.append({
+ "metrics" : [
+ ( "util", "area" ),
+ ],
+ "scalars" : [
+ "util:warn",
+ "util:crit",
+ ],
+ "range" : (0, 100),
+})
+
graph_info.append({
"metrics" : [