forked from cloved/check_traffic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
check_traffic.php
22 lines (21 loc) · 1.03 KB
/
check_traffic.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
$opt[1] = "--vertical-label \"Traffic $UNIT[1]\" --title \"Traffic $UNIT[1] ($servicedesc) at $hostname\" ";
$def[1] = "DEF:var1=$rrdfile:$DS[1]:MAX " ;
$def[1] .= "DEF:var2=$rrdfile:$DS[2]:MAX " ;
$def[1] .= "DEF:var3=$rrdfile:$DS[3]:MAX " ;
#$def[1] = "DEF:var1=$rrdfile:$DS[1]:AVERAGE " ;
#$def[1] .= "DEF:var2=$rrdfile:$DS[2]:AVERAGE " ;
#$def[1] .= "DEF:var3=$rrdfile:$DS[3]:AVERAGE " ;
$def[1] .= "LINE1:var1#3F5EAB:\"in\" " ;
$def[1] .= "GPRINT:var1:LAST:\"%7.2lf $UNIT[1] last\" " ;
$def[1] .= "GPRINT:var1:AVERAGE:\"%7.2lf $UNIT[1] avg\" " ;
$def[1] .= "GPRINT:var1:MAX:\"%7.2lf $UNIT[1] max\\n\" " ;
$def[1] .= "LINE1:var2#00ff00:\"out\" " ;
$def[1] .= "GPRINT:var2:LAST:\"%7.2lf $UNIT[2] last\" " ;
$def[1] .= "GPRINT:var2:AVERAGE:\"%7.2lf $UNIT[2] avg\" " ;
$def[1] .= "GPRINT:var2:MAX:\"%7.2lf $UNIT[2] max\\n\" ";
#$def[1] .= "LINE1:var3#aaee00:\"total\" " ;
#$def[1] .= "GPRINT:var3:LAST:\"%7.2lf $UNIT[3] last\" " ;
#$def[1] .= "GPRINT:var3:AVERAGE:\"%7.2lf $UNIT[3] avg\" " ;
#$def[1] .= "GPRINT:var3:MAX:\"%7.2lf $UNIT[3] max\" ";
?>