Refactoring: Changed remaining check parameters starting with an 's' to the new rules...
[check_mk.git] / pnp-templates / check_mk-ipmi.php
blobc52a0f0f63f0df4ec168afab26809c23f6b77265
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 ($UNIT[1] == 'degrees_C') {
27 $unit = "°C";
28 $vlabel = "--vertical-label 'Celsius'";
29 } elseif ($UNIT[1] == 'unspecified') {
30 $unit = "";
31 $vlabel = "";
32 } else {
33 $unit = $UNIT[1];
34 $vlabel = "--vertical-label '$UNIT[1]'";
37 $opt[1] = "$vlabel -l0 --title \"IPMI sensor $NAME[1] / $hostname\" ";
39 $def[1] = "DEF:value=$RRDFILE[1]:$DS[1]:MAX ";
40 $def[1] .= "AREA:value#ffd040:\"Sensor $NAME[1]\" ";
41 $def[1] .= "LINE:value#ff8000 ";
42 $def[1] .= "GPRINT:value:LAST:\"%6.2lf $unit last\" " ;
43 $def[1] .= "GPRINT:value:AVERAGE:\"%6.2lf $unit avg\" " ;
44 $def[1] .= "GPRINT:value:MAX:\"%6.2lf $unit max\\n\" ";