mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
updates, more mibs, cleanups
git-svn-id: http://www.observium.org/svn/observer/trunk@486 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -236,11 +236,11 @@ function interface_rates ($rrd_file) // Returns the last in/out value in RRD
|
||||
return $rate;
|
||||
}
|
||||
|
||||
function interface_errors ($rrd_file) // Returns the last in/out errors value in RRD
|
||||
function interface_errors ($rrd_file, $period = '-1d') // Returns the last in/out errors value in RRD
|
||||
{
|
||||
global $config;
|
||||
#$rrdfile = $config['rrd_dir'] . "/" . $interface['hostname'] . "/" . $interface['ifIndex'] . ".rrd";
|
||||
$cmd = $config['rrdtool']." fetch -s -1d -e -300s $rrd_file AVERAGE | grep : | cut -d\" \" -f 4,5";
|
||||
$cmd = $config['rrdtool']." fetch -s $period -e -300s $rrd_file AVERAGE | grep : | cut -d\" \" -f 4,5";
|
||||
$data = trim(shell_exec($cmd));
|
||||
foreach( explode("\n", $data) as $entry) {
|
||||
list($in, $out) = explode(" ", $entry);
|
||||
|
||||
Reference in New Issue
Block a user