mirror of
https://github.com/librenms/librenms.git
synced 2024-09-23 03:18:54 +00:00
fix uptime graph
git-svn-id: http://www.observium.org/svn/observer/trunk@1652 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
parent
a836426f55
commit
a2636b4668
@ -5,11 +5,7 @@ $scale_min = "0";
|
||||
include("includes/graphs/common.inc.php");
|
||||
$device = device_by_id_cache($id);
|
||||
|
||||
if (is_file($config['rrd_dir'] . "/" . $device['hostname'] . "/hrSystem.rrd")) {
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/hrSystem.rrd";
|
||||
} else {
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/uptime.rrd";
|
||||
}
|
||||
|
||||
$rrd_options .= " DEF:uptime=$rrd_filename:uptime:AVERAGE";
|
||||
$rrd_options .= " CDEF:cuptime=uptime,86400,/";
|
||||
|
@ -107,7 +107,8 @@ function popUp(URL) {
|
||||
$end = utime(); $run = $end - $start;
|
||||
$gentime = substr($run, 0, 5);
|
||||
|
||||
echo '<br /> <div id="footer">' . (isset($config['footer']) ? $config['footer'] : '');
|
||||
|
||||
echo '<br /> <br /> <br /> <br /> <div id="footer">' . (isset($config['footer']) ? $config['footer'] : '');
|
||||
echo '<br />Powered by <a href="http://www.observium.org" target="_blank">Observium ' . $config['version'];
|
||||
|
||||
if (file_exists('.svn/entries'))
|
||||
|
@ -105,7 +105,7 @@ while ($device = mysql_fetch_assoc($device_query))
|
||||
$sysDescr = trim(shell_exec($config['snmpget'] . " -m SNMPv2-MIB -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " sysDescr.0"));
|
||||
$sysName = strtolower($sysName);
|
||||
|
||||
$hrSystemUptime = snmp_get($device, ".1.3.6.1.2.1.25.1.1.0", "-Oqv", "HOST-RESOURCES-MIB");
|
||||
$hrSystemUptime = snmp_get($device, "HOST-RESOURCES-MIB::hrSystemUptime.0", "-Oqv");
|
||||
|
||||
# echo("UPTIMES: ".$hrSystemUptime."|".$sysUptime."]");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user