Refactoring: Moved check parameters from unsorted.py to dedicated modules (CMK-1393)
[check_mk.git] / pnp-templates / check_mk-jolokia_metrics.mem.php
blobc4c1c0bfc6e847d9bcc76f703f19e6e04e9d8e33
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.
27 $opt[1] = "--vertical-label 'MB' -l 0 --title '$hostname / $servicedesc: Heap and Nonheap levels' ";
28 $def[1] = ""
29 . "DEF:heap=$RRDFILE[1]:$DS[1]:MAX "
30 . "DEF:nonheap=$RRDFILE[2]:$DS[1]:MAX "
31 . "CDEF:min_nonheap=0,nonheap,- "
32 . "CDEF:total=heap,nonheap,+ "
34 . "AREA:heap#00c0ff:\"Heap\" ";
35 if ($MAX[1]) {
36 $def[1] .= "LINE1:$MAX[1]#003077:\"Heap MAX\" ";
38 if ($CRIT[1]) {
39 $def[1] .= "LINE1:$WARN[1]#a0ad00:\"Heap WARN\" "
40 . "LINE1:$CRIT[1]#ad0000:\"Heap CRIT\" ";
44 $def[1] .= "AREA:min_nonheap#3430bf:\"Nonheap\" ";
45 if ($MAX[2]) {
46 $def[1] .= "LINE1:-$MAX[2]#003233:\"Nonheap MAX \" ";
48 if ($CRIT[2]) {
49 $def[1] .= "LINE1:-$WARN[2]#adfd30:\"Nonheap WARN\" "
50 . "LINE1:-$CRIT[2]#ff0080:\"Nonheap CRIT\" ";
54 $def[1] .= "GPRINT:total:LAST:\"Total %.2lfMB last\" "
55 . "GPRINT:total:AVERAGE:\"%.2lfMB avg\" "
56 . "GPRINT:total:MAX:\"%.2lfMB max \" " . "";