Refactoring: Changed remaining check parameters starting with an 's' to the new rules...
[check_mk.git] / pnp-templates / check-mk.php
blobfd04d6f75a87dffafe5c92679d923a60d09e5b5f
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 $range = $CRIT[1];
28 $opt[1] = "--vertical-label 'time (s)' -l 0 --title '$hostname: Check_MK check execution time' ";
30 $def[1] = "DEF:extime=$RRDFILE[1]:$DS[1]:MAX ";
31 $def[1] .= "AREA:extime#d080af:\"execution time \" ";
32 $def[1] .= "LINE1:extime#d020a0: ";
33 $def[1] .= "GPRINT:extime:LAST:\"last\: %8.2lf s\" ";
34 $def[1] .= "GPRINT:extime:MAX:\"max\: %8.2lf s \" ";
35 $def[1] .= "GPRINT:extime:AVERAGE:\"avg\: %8.2lf s\\n\" ";
37 if (isset($RRDFILE[2])) {
39 $opt[2] = "--vertical-label 'time (s)' -l 0 --title '$hostname: Check_MK process times' ";
40 $def[2] = "DEF:user_time=$RRDFILE[2]:$DS[1]:MAX ";
41 $def[2] .= "LINE1:user_time#d020a0:\"user time\" ";
42 $def[2] .= "GPRINT:user_time:LAST:\" last\: %8.2lf s\" ";
43 $def[2] .= "GPRINT:user_time:MAX:\"max\: %8.2lf s \" ";
44 $def[2] .= "GPRINT:user_time:AVERAGE:\"avg\: %8.2lf s\\n\" ";
46 $def[2] .= "DEF:system_time=$RRDFILE[3]:$DS[1]:MAX ";
47 $def[2] .= "LINE1:system_time#d08400:\"system time\" ";
48 $def[2] .= "GPRINT:system_time:LAST:\" last\: %8.2lf s\" ";
49 $def[2] .= "GPRINT:system_time:MAX:\"max\: %8.2lf s \" ";
50 $def[2] .= "GPRINT:system_time:AVERAGE:\"avg\: %8.2lf s\\n\" ";
52 $def[2] .= "DEF:children_user_time=$RRDFILE[4]:$DS[1]:MAX ";
53 $def[2] .= "LINE1:children_user_time#308400:\"childr. user time \" ";
54 $def[2] .= "GPRINT:children_user_time:LAST:\" last\: %8.2lf s\" ";
55 $def[2] .= "GPRINT:children_user_time:MAX:\"max\: %8.2lf s \" ";
56 $def[2] .= "GPRINT:children_user_time:AVERAGE:\"avg\: %8.2lf s\\n\" ";
58 $def[2] .= "DEF:children_system_time=$RRDFILE[5]:$DS[1]:MAX ";
59 $def[2] .= "LINE1:children_system_time#303400:\"childr. system time\" ";
60 $def[2] .= "GPRINT:children_system_time:LAST:\"last\: %8.2lf s\" ";
61 $def[2] .= "GPRINT:children_system_time:MAX:\"max\: %8.2lf s \" ";
62 $def[2] .= "GPRINT:children_system_time:AVERAGE:\"avg\: %8.2lf s\\n\" ";