[checkmk-commits] 3537 FIX PNP/Graph Templates: fixed incorrect scaling of check-mk-ping and check-mk-host-ping

Andreas Boesl ab at mathias-kettner.de
Tue May 24 11:52:31 CEST 2016


Module: check_mk
Branch: master
Commit: a72ac211c7bc8e668d62851c72f86f00afe36672
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a72ac211c7bc8e668d62851c72f86f00afe36672

Author: Andreas Boesl <ab at mathias-kettner.de>
Date:   Tue May 24 11:49:42 2016 +0200

3537 FIX PNP/Graph Templates: fixed incorrect scaling of check-mk-ping and check-mk-host-ping

The values were off by a factor of 1000.

---

 .werks/3537                          |    9 ++++++
 ChangeLog                            |    1 +
 pnp-templates/check-mk-host-ping.php |    1 -
 pnp-templates/check-mk-ping.php      |   59 ----------------------------------
 web/plugins/metrics/check_mk.py      |   13 ++++++++
 5 files changed, 23 insertions(+), 60 deletions(-)

diff --git a/.werks/3537 b/.werks/3537
new file mode 100644
index 0000000..db8aa3e
--- /dev/null
+++ b/.werks/3537
@@ -0,0 +1,9 @@
+Title: PNP/Graph Templates: fixed incorrect scaling of check-mk-ping and check-mk-host-ping
+Level: 1
+Component: multisite
+Compatible: compat
+Version: 1.2.9i1
+Date: 1464083314
+Class: fix
+
+The values were off by a factor of 1000.
diff --git a/ChangeLog b/ChangeLog
index 31ac7c4..cad4cd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -304,6 +304,7 @@
     * 3569 FIX: Dashboard: Fixed wrong links to views in statistics dashlets when using state filters in dashlet
     * 3570 FIX: Dashboard: Fixed different issues with filtering using WATO folders
     * 3571 FIX: Fixed missing downtime author filter
+    * 3537 FIX: PNP/Graph Templates: fixed incorrect scaling of check-mk-ping and check-mk-host-ping...
 
     WATO:
     * 3244 WATO BI Module: swap order of aggregation function and child node selection...
diff --git a/pnp-templates/check-mk-host-ping.php b/pnp-templates/check-mk-host-ping.php
deleted file mode 120000
index 98c29f2..0000000
--- a/pnp-templates/check-mk-host-ping.php
+++ /dev/null
@@ -1 +0,0 @@
-check-mk-ping.php
\ No newline at end of file
diff --git a/pnp-templates/check-mk-ping.php b/pnp-templates/check-mk-ping.php
deleted file mode 100644
index 13b147d..0000000
--- a/pnp-templates/check-mk-ping.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-# +------------------------------------------------------------------+
-# |             ____ _               _        __  __ _  __           |
-# |            / ___| |__   ___  ___| | __   |  \/  | |/ /           |
-# |           | |   | '_ \ / _ \/ __| |/ /   | |\/| | ' /            |
-# |           | |___| | | |  __/ (__|   <    | |  | | . \            |
-# |            \____|_| |_|\___|\___|_|\_\___|_|  |_|_|\_\           |
-# |                                                                  |
-# | Copyright Mathias Kettner 2014             mk at 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-
-# tails. 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.
-
-$ds_name[1] = "Round Trip Averages";
-$opt[1] = "--vertical-label \"RTA (ms)\" -X0 --title \"Ping times for $hostname\" ";
-$def[1] =  "DEF:var1=$RRDFILE[1]:$DS[1]:AVERAGE " ;
-$def[1] .= "DEF:var2=$RRDFILE[2]:$DS[2]:MAX " ;
-$def[1] .= "VDEF:maxrta=var1,MAXIMUM " ;
-$def[1] .= "CDEF:loss1=var2,100,/,maxrta,* " ;
-$def[1] .= "CDEF:sp1=var1,100,/,12,* " ;
-$def[1] .= "CDEF:sp2=var1,100,/,30,* " ;
-$def[1] .= "CDEF:sp3=var1,100,/,50,* " ;
-$def[1] .= "CDEF:sp4=var1,100,/,70,* " ;
-$def[1] .= "CDEF:loss2=loss1,100,/,80,* " ;
-$def[1] .= "CDEF:loss3=loss1,100,/,60,* " ;
-$def[1] .= "CDEF:loss4=loss1,100,/,40,* " ;
-$def[1] .= "CDEF:loss5=loss1,100,/,20,* " ;
-
-$def[1] .= "AREA:var1#00FF5C:\"Round Trip Times \" " ;
-$def[1] .= "AREA:sp4#00FF7C: " ;
-$def[1] .= "AREA:sp3#00FF9C: " ;
-$def[1] .= "AREA:sp2#00FFBC: " ;
-$def[1] .= "AREA:sp1#00FFDC: " ;
-$def[1] .= "LINE1:var1#000000:\"\" " ;
-$def[1] .= "GPRINT:var1:LAST:\"%6.2lf $UNIT[1] last \" " ;
-$def[1] .= "GPRINT:var1:MAX:\"%6.2lf $UNIT[1] max \" " ;
-$def[1] .= "GPRINT:var1:AVERAGE:\"%6.2lf $UNIT[1] avg \\n\" " ;
-
-$def[1] .= "AREA:loss1#F20:\"Packet Loss        \" ";
-$def[1] .= "AREA:loss2#F40 ";
-$def[1] .= "AREA:loss3#F60 ";
-$def[1] .= "AREA:loss4#F80 ";
-$def[1] .= "AREA:loss5#FA0 ";
-
-$def[1] .= "GPRINT:var2:MAX:\"%3.0lf $UNIT[2] max \\n\" " ;
-
-?>
diff --git a/web/plugins/metrics/check_mk.py b/web/plugins/metrics/check_mk.py
index b90ffdc..8019946 100644
--- a/web/plugins/metrics/check_mk.py
+++ b/web/plugins/metrics/check_mk.py
@@ -3364,6 +3364,19 @@ check_metrics["check_mk_active-icmp"] = {
     "rtmin" : { "scale" : m },
 }
 
+
+check_metrics["check-mk-host-ping"] = {
+    "rta"   : { "scale" : m },
+    "rtmax" : { "scale" : m },
+    "rtmin" : { "scale" : m },
+}
+
+check_metrics["check-mk-ping"] = {
+    "rta"   : { "scale" : m },
+    "rtmax" : { "scale" : m },
+    "rtmin" : { "scale" : m },
+}
+
 check_metrics["check-mk-host-ping-cluster"] = {
     "~.*rta"   : { "name" : "rta",   "scale": m },
     "~.*pl"    : { "name" : "pl",    "scale": m },



More information about the checkmk-commits mailing list