Refactoring: Moved check parameters from unsorted.py to dedicated modules (CMK-1393)
[check_mk.git] / pnp-templates / check_mk-ibm_svc_nodestats.disk_latency.php
bloba8b201c2bcb3f9e566ece2ba76dce1823b2182ff
1 <?php
2 # +------------------------------------------------------------------+
3 # | ____ _ _ __ __ _ __ |
4 # | / ___| |__ ___ ___| | __ | \/ | |/ / |
5 # | | | | '_ \ / _ \/ __| |/ / | |\/| | ' / |
6 # | | |___| | | | __/ (__| < | | | | . \ |
7 # | \____|_| |_|\___|\___|_|\_\___|_| |_|_|\_\ |
8 # | |
9 # | Copyright Mathias Kettner 2014 mk@mathias-kettner.de |
10 # +------------------------------------------------------------------+
12 # This file is part of Check_MK.
13 # The official homepage is at http://mathias-kettner.de/check_mk.
15 # check_mk is free software; you can redistribute it and/or modify it
16 # under the terms of the GNU General Public License as published by
17 # the Free Software Foundation in version 2. check_mk is distributed
18 # in the hope that it will be useful, but WITHOUT ANY WARRANTY; with-
19 # out even the implied warranty of MERCHANTABILITY or FITNESS FOR A
20 # PARTICULAR PURPOSE. See the GNU General Public License for more de-
21 # tails. You should have received a copy of the GNU General Public
22 # License along with GNU Make; see the file COPYING. If not, write
23 # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
24 # Boston, MA 02110-1301 USA.
26 if (isset($DS[2])) {
28 // Make data sources available via names
29 $RRD = array();
30 foreach ($NAME as $i => $n) {
31 $RRD[$n] = "$RRDFILE[$i]:$DS[$i]:MAX";
32 $WARN[$n] = $WARN[$i];
33 $CRIT[$n] = $CRIT[$i];
34 $MIN[$n] = $MIN[$i];
35 $MAX[$n] = $MAX[$i];
38 $opt[1] = "--vertical-label 'ms' -X0 --title \"$hostname / $servicedesc\" ";
40 $def[1] =
41 "HRULE:0#a0a0a0 ".
42 # read
43 "DEF:read=$RRD[read_latency] ".
44 "AREA:read#40c080:\"Latency for read \" ".
45 "GPRINT:read:LAST:\"%8.0lf ms last\" ".
46 "GPRINT:read:AVERAGE:\"%6.0lf ms avg\" ".
47 "GPRINT:read:MAX:\"%6.0lf ms max\\n\" ";
49 # write
50 $def[1] .=
51 "DEF:write=$RRD[write_latency] ".
52 "CDEF:write_neg=write,-1,* ".
53 "AREA:write_neg#4080c0:\"Latency for write \" ".
54 "GPRINT:write:LAST:\"%6.0lf ms last\" ".
55 "GPRINT:write:AVERAGE:\"%6.0lf ms avg\" ".
56 "GPRINT:write:MAX:\"%6.0lf ms max\\n\" ".
57 "";