uptime fixes

git-svn-id: http://www.observium.org/svn/observer/trunk@143 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2008-03-12 16:35:00 +00:00
parent 02c0ba9178
commit 204af910cd
2 changed files with 4 additions and 3 deletions

View File

@@ -13,6 +13,7 @@ include("billing-functions.php");
function rrdtool_update($rrdfile, $rrdupdate) {
global $rrdtool;
return `$rrdtool update $rrdfile $rrdupdate`;
}
function getHostOS($hostname, $community, $snmpver) {

View File

@@ -253,10 +253,10 @@ while ($device = mysql_fetch_array($device_query)) {
mail($notify_email, "Device Rebooted: " . $device['hostname'], "Device Rebooted :" . $device['hostname'] . " at " . date('l dS F Y h:i:s A'), $config['email_headers']);
}
$uptime_rrd = $rrd_dir . "/" . $device['hostname'] . "/uptime.rrd";
$uptimerrd = $rrd_dir . "/" . $device['hostname'] . "/uptime.rrd";
$old_uptime_rrd = "rrd/" . $device['hostname'] . "-uptime.rrd";
if(is_file($old_uptime_rrd) && !is_file($uptimerrd)) { rename($old_uptime_rrd, $uptime_rrd); echo("Moving $old_uptime_rrd to $uptime_rrd"); }
$old_uptimerrd = "rrd/" . $device['hostname'] . "-uptime.rrd";
if(is_file($old_uptimerrd) && !is_file($uptimerrd)) { rename($old_uptimerrd, $uptimerrd); echo("Moving $old_uptimerrd to $uptimerrd"); }
if(!is_file($uptimerrd)) {
$woo = `rrdtool create $uptimerrd \