Refactoring: Changed all check parameters starting with a 'g' or 'h' to new rulespec...
[check_mk.git] / pnp-templates / check_mk-netapp_api_disk.summary.php
blobec3a175090237bcbdea6a74c5a468bcacd7668c7
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 setlocale(LC_ALL, "POSIX");
28 // Make data sources available via names
29 $RRD = array();
30 foreach ($NAME as $i => $n) {
31 $RRD[$n] = "$RRDFILE[$i]:$DS[$i]:AVERAGE";
34 $sizegb = sprintf("%.1f", $MAX[1]);
36 $opt[1] = "--vertical-label Bytes -l 0 -b 1024 --title 'Total raw capacity of $hostname' ";
37 # First graph show current filesystem usage
38 $def[1] = "DEF:bytes=$RRD[total_disk_capacity] ";
39 $def[1] .= "AREA:bytes#00ffc6:\"Capacity\" ";
41 # read ops
42 $opt[2] = "--vertical-label Disks -l 0 --title 'Spare and broken disks of $hostname' ";
43 $def[2] = "".
44 "DEF:sparedisks=$RRD[spare_disks] ".
45 "LINE:sparedisks#00e060:\" Spare \" ".
46 "GPRINT:sparedisks:LAST:\"%7.0lf last\" ".
47 "GPRINT:sparedisks:AVERAGE:\"%7.0lf avg\" ".
48 "GPRINT:sparedisks:MAX:\"%7.0lf max\\n\" ".
50 "DEF:brokendisks=$RRD[failed_disks] ".
51 "LINE:brokendisks#e04000:\" Failed\" ".
52 "GPRINT:brokendisks:LAST:\"%7.0lf last\" ".
53 "GPRINT:brokendisks:AVERAGE:\"%7.0lf avg\" ".
54 "GPRINT:brokendisks:MAX:\"%7.0lf max\\n\" ";