Refactoring: Moved check parameters from unsorted.py to dedicated modules (CMK-1393)
[check_mk.git] / pnp-templates / check_mk-openvpn_clients.php
blob94d248a3866e63afc9e51807f8ec06c3a57b307a
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 $parts = explode("_",$servicedesc);
27 $channel = $parts[2];
29 $opt[1] = "--vertical-label \"MBit per secound\" -X0 -l0 --title \"VPN-Traffic (raw) $hostname / $channel\" ";
31 $def[1] = "DEF:in=$RRDFILE[1]:$DS[1]:MAX " ;
32 $def[1] .= "DEF:out=$RRDFILE[2]:$DS[2]:MAX " ;
33 $def[1] .= "CDEF:mb_out=out,131072,/ " ;
34 $def[1] .= "CDEF:mb_out_n=mb_out,-1,* " ;
35 $def[1] .= "CDEF:mb_in=in,131072,/ " ;
36 $def[1] .= "AREA:mb_in#30d050:\"Inbound \" " ;
37 $def[1] .= "GPRINT:mb_in:LAST:\"%6.2lf MBit/s last\" " ;
38 $def[1] .= "GPRINT:mb_in:AVERAGE:\"%6.2lf MBit/s avg\" " ;
39 $def[1] .= "GPRINT:mb_in:MAX:\"%6.2lf MBit/s max\\n\" ";
40 $def[1] .= "AREA:mb_out_n#0060c0:\"Outbound \" " ;
41 $def[1] .= "GPRINT:mb_out:LAST:\"%6.2lf MBit/s last\" " ;
42 $def[1] .= "GPRINT:mb_out:AVERAGE:\"%6.2lf MBit/s avg\" " ;
43 $def[1] .= "GPRINT:mb_out:MAX:\"%6.2lf MBit/s max\\n\" " ;