Refactoring: Moved check parameters from unsorted.py to dedicated modules (CMK-1393)
[check_mk.git] / pnp-templates / check_mk-apc_symmetra.php
blob68a42e3bbafeebef6555967c552901b1a5dfc387
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 $color = sprintf("ff%02x80", $ACT[2] * 3, $ACT[2] * 2);
28 $opt[1] = "--vertical-label \"Percent\" -u 100 --title \"Battery Capacity\" ";
29 $def[1] = "DEF:var2=$RRDFILE[1]:$DS[1]:MIN ";
30 $def[1] .= "AREA:var2#80e0c0:\"Capacity\:\" ";
31 $def[1] .= "GPRINT:var2:LAST:\"%2.0lf%%\" ";
32 $def[1] .= "LINE1:var2#008040:\"\" ";
33 $def[1] .= "GPRINT:var2:MIN:\"(Min\: %2.0lf%%,\" ";
34 $def[1] .= "GPRINT:var2:MAX:\"Max\: %2.0lf%%,\" ";
35 $def[1] .= "GPRINT:var2:AVERAGE:\"Avg\: %2.0lf%%)\" ";
36 $def[1] .= "HRULE:$CRIT[1]#FF0000:\"Critical\: $CRIT[1]%\" ";
38 $opt[2] = "--vertical-label \"Celsius\" -u 60 --title \"Battery temperature\" ";
39 $def[2] = "DEF:var1=$RRDFILE[2]:$DS[2]:MAX ";
40 $def[2] .= "AREA:var1#$color:\"Temperature\:\" ";
41 $def[2] .= "GPRINT:var1:LAST:\"%2.0lfC\" ";
42 $def[2] .= "LINE1:var1#800040:\"\" ";
43 $def[2] .= "GPRINT:var1:MIN:\"(min\: %2.0lfC,\" ";
44 $def[2] .= "GPRINT:var1:MAX:\"max\: %2.0lfC,\" ";
45 $def[2] .= "GPRINT:var1:AVERAGE:\"Avg\: %2.0lfC)\" ";
46 $def[2] .= "HRULE:$CRIT[2]#FF0000:\"Critical\: $CRIT[2]C\" ";
49 $opt[3] = "--vertical-label \"Ampere\" -l -0 --title \"Currencies\" ";
50 $def[3] = "DEF:batcur=$RRDFILE[3]:$DS[3]:MAX ";
51 $def[3] .= "DEF:outcur=$RRDFILE[5]:$DS[5]:MAX ";
52 $def[3] .= "LINE:batcur#c0c000:\"Battery Currency\:\" ";
53 $def[3] .= "GPRINT:batcur:LAST:\"%2.0lfA\" ";
54 $def[3] .= "LINE:outcur#00c0c0:\"Output Currency\:\" ";
55 $def[3] .= "GPRINT:outcur:LAST:\"%2.0lfA\" ";
57 $opt[4] = "--vertical-label \"Volt\" -u 250 --title \"Output Voltage\" ";
58 $def[4] = "DEF:volt=$RRDFILE[4]:$DS[4]:MIN ";
59 $def[4] .= "GPRINT:volt:LAST:\"%2.0lfV\" ";
60 $def[4] .= "LINE1:volt#408040:\"\" ";
61 $def[4] .= "GPRINT:volt:MIN:\"(min\: %2.0lfV,\" ";
62 $def[4] .= "GPRINT:volt:AVERAGE:\"avg\: %2.0lfV)\" ";
63 $def[4] .= "HRULE:$CRIT[4]#FF0000:\"Critical\: $CRIT[4]V\" ";
65 $opt[5] = "--vertical-label \"Time\" --title \"Remaining Runtime\" ";
66 $def[5] = "DEF:minutes=$RRDFILE[6]:$DS[6]:MIN ";
67 $def[5] .= "GPRINT:minutes:LAST:\"%2.0lfmin\" ";
68 $def[5] .= "LINE1:minutes#408040:\"\" ";
69 $def[5] .= "GPRINT:minutes:MIN:\"(min\: %2.0lfmin,\" ";
70 $def[5] .= "GPRINT:minutes:MAX:\"max\: %2.0lfmin,\" ";
71 $def[5] .= "GPRINT:minutes:AVERAGE:\"avg\: %2.0lfmin)\" ";
72 #$def[5] .= "HRULE:$CRIT[4]#FF0000:\"Critical\: $CRIT[4]V\" ";