mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
uptime fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@143 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -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) {
|
||||
|
@@ -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 \
|
||||
|
Reference in New Issue
Block a user