Refactoring: Moved check parameters from unsorted.py to dedicated modules (CMK-1393)
[check_mk.git] / pnp-templates / check_mk-rmon_stats.php
blob3f25ffdf8ece6c80359c4e99eb82b45b43e2e260
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 $opt[1] = "--vertical-label 'pkts/sec' -u 10 -X0 --title \"$servicedesc on $hostname\" ";
28 $stats = array(
29 array(1, "BCAST", "", "#777777", ""),
30 array(2, "MCAST", " ", "#a00000", ""),
31 array(3, "0-63B", " ", "#ff0000", ""),
32 array(4, "64-127B", " ", "#ffc000", "\\n"),
33 array(5, "128-255B", " ", "#f000f0", ""),
34 array(6, "256-511B", " ", "#00b0b0", ""),
35 array(7, "512-1024B", " ", "#c060ff", ""),
36 array(8, "1024-1518B", " ", "#00f040", "\\n")
39 $def[1] = "";
41 foreach ($stats as $entry) {
42 list($i, $stat, $spaces, $color, $nl) = $entry;
43 $def[1] .= "DEF:$stat=$RRDFILE[$i]:$DS[$i]:MAX ";
44 $def[1] .= "AREA:$stat$color:\"$stat\":STACK ";
45 $def[1] .= "GPRINT:$stat:LAST:\"$spaces%3.0lf$nl\" ";