-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathcheck_NIC.php
More file actions
23 lines (21 loc) · 804 Bytes
/
check_NIC.php
File metadata and controls
23 lines (21 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
#
# Copyright (c) 2006-2010 Joerg Linge (http://www.pnp4nagios.org)
# Plugin: check_NIC.php
#
#
$ds_name[1] = "Check NIC";
$opt[1] = "--lower-limit 0 --vertical-label \"Check NIC\" --title \"Check NIC\" ";
$def[1] = rrd::def("var1", $RRDFILE[1], $DS[1], "AVERAGE") ;
$def[1] .= rrd::gradient("var1", "ff5c00", "ffdc00", "Check NIC", 10) ;
$def[1] .= rrd::gprint("var1", array("LAST", "MAX", "AVERAGE"), "%.0lf $UNIT[1]") ;
$def[1] .= rrd::line1("var1", "#000000") ;
if($WARN[1] != ""){
if($UNIT[1] == "%%"){ $UNIT[1] = "%"; };
$def[1] .= rrd::hrule($WARN[1], "#FFFF00", "Warning ".$WARN[1].$UNIT[1]."\\n");
}
if($CRIT[1] != ""){
if($UNIT[1] == "%%"){ $UNIT[1] = "%"; };
$def[1] .= rrd::hrule($CRIT[1], "#FF0000", "Critical ".$CRIT[1].$UNIT[1]."\\n");
}
?>