Refactoring: Moved check parameters from unsorted.py to dedicated modules (CMK-1393)
[check_mk.git] / pnp-templates / check_mk-arcserve_backup.php
blobe17505d3b86ebed007e610b901ad068d032438d8
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 # Copyright (c) 2006-2010 Joerg Linge (http://www.pnp4nagios.org)
28 # Default Template used if no other template is found.
29 # Don`t delete this file !
31 # Define some colors ..
33 $_AREA = '#256aef';
34 $_LINE = '#000000';
36 $_start_color = array("808005", "000080", "000000");
37 $_end_color = array("C0C0C0", "BDC6DE", "BDC6DE");
39 foreach ($this->DS as $KEY=>$VAL) {
41 $vlabel = " ";
42 $lower = "";
43 $upper = "";
45 if ($VAL['UNIT'] == "%%") {
46 $vlabel = "%";
47 $upper = " --upper-limit=101 ";
48 $lower = " --lower-limit=0 ";
50 else {
51 $vlabel = $VAL['UNIT'];
54 $opt[$KEY] = '--vertical-label "' . $vlabel . '" --title "' . $this->MACRO['DISP_HOSTNAME'] . ' / ' . $this->MACRO['DISP_SERVICEDESC'] . '"' . $upper . $lower;
55 $ds_name[$KEY] = $VAL['LABEL'];
56 $def[$KEY] = rrd::def ("var1", $VAL['RRDFILE'], $VAL['DS'], "AVERAGE");
57 $def[$KEY] .= rrd::gradient("var1", $_start_color[$KEY], $_end_color[$KEY], rrd::cut($VAL['NAME'],16), 20);
58 $def[$KEY] .= rrd::line1 ("var1", $_LINE );
59 $def[$KEY] .= rrd::gprint ("var1", array("LAST","MAX","AVERAGE"), "%3.2lf %S".$VAL['UNIT']);