Refactoring: Moved check parameters from unsorted.py to dedicated modules (CMK-1393)
[check_mk.git] / pnp-templates / check_mk-zfs_arc_cache.l2.php
blobdd628bfadc5b9dbaa3a6aed4d8ff77f0903070dd
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 // Make data sources available via names
27 $RRD = array();
28 foreach ($NAME as $i => $n) {
29 $RRD[$n] = "$RRDFILE[$i]:$DS[$i]:MAX";
30 $WARN[$n] = $WARN[$i];
31 $CRIT[$n] = $CRIT[$i];
32 $MIN[$n] = $MIN[$i];
33 $MAX[$n] = $MAX[$i];
37 # hit_ratio
40 $ds_name[1] = "L2 Cache Hit Ratio";
41 $opt[1] = "--vertical-label '%' -l0 --title \"L2 Cache Hit Ratio for $hostname / $servicedesc\" ";
42 $def[1] = "DEF:hit_ratio=".$RRD['l2_hit_ratio']." ";
43 $def[1] .= "LINE:hit_ratio#408000:\"L2 Cache Hit Ratio \" ";
44 $def[1] .= "GPRINT:hit_ratio:LAST:\"last %2.2lf %%\" ";
45 $def[1] .= "GPRINT:hit_ratio:AVERAGE:\"avg %2.2lf %%\" ";
46 $def[1] .= "GPRINT:hit_ratio:MIN:\"min %2.2lf %%\" ";
47 $def[1] .= "GPRINT:hit_ratio:MAX:\"max %2.2lf %%\\n\" ";
50 # size
53 $ds_name[2] = "L2 Cache Size";
54 $opt[2] = "--vertical-label 'Bytes' -l0 --title \"L2 Cache Size for $hostname / $servicedesc\" ";
55 $def[2] = "DEF:size=".$RRD['l2_size']." ";
56 $def[2] .= "AREA:size#408000:\"L2 Cache Size\" ";
57 $def[2] .= "LINE:size#000000 ";
58 $def[2] .= "GPRINT:size:LAST:\"last %2.0lf Bytes\" ";
59 $def[2] .= "GPRINT:size:AVERAGE:\"avg %2.0lf Bytes\\n\" ";
60 $def[2] .= "GPRINT:size:MIN:\" min %2.0lf Bytes\" ";
61 $def[2] .= "GPRINT:size:MAX:\"max %2.0lf Bytes\\n\" ";