mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix some stuff, break some stuff (ports disaply is missing some stuff atm)
git-svn-id: http://www.observium.org/svn/observer/trunk@2290 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
$sensor = mysql_fetch_assoc(mysql_query("SELECT * FROM entPhysical as E, devices as D WHERE entPhysical_id = '".mres($_GET['a'])."' and D.device_id = E.device_id"));
|
||||
|
||||
switch ($sensor['entSensorType'])
|
||||
{
|
||||
case 'celsius':
|
||||
case 'watts':
|
||||
case 'voltsDC':
|
||||
case 'amperes':
|
||||
$scale_min = "0";
|
||||
break;
|
||||
}
|
||||
|
||||
include("includes/graphs/common.inc.php");
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $sensor['hostname'] . "/" . safename("ces-" . $sensor['entPhysicalIndex'] . ".rrd");
|
||||
|
||||
$type = str_pad($sensor['entSensorType'], 8);
|
||||
$type = substr($type,0,8);
|
||||
|
||||
$rrd_options .= " DEF:avg=$rrd_filename:value:AVERAGE";
|
||||
$rrd_options .= " DEF:min=$rrd_filename:value:MIN";
|
||||
$rrd_options .= " DEF:max=$rrd_filename:value:MAX";
|
||||
$rrd_options .= " COMMENT:' Last Min Max Ave\\n'";
|
||||
$rrd_options .= " AREA:max#a5a5a5";
|
||||
$rrd_options .= " AREA:min#ffffff";
|
||||
$rrd_options .= " LINE1.25:avg#aa2200:'".$type."'";
|
||||
$rrd_options .= " GPRINT:avg:AVERAGE:%5.2lf%s";
|
||||
$rrd_options .= " GPRINT:max:MAX:%5.2lf%s";
|
||||
$rrd_options .= " GPRINT:max:MAX:%5.2lf%s";
|
||||
$rrd_options .= " GPRINT:avg:LAST:%5.2lf%s";
|
||||
|
||||
?>
|
Reference in New Issue
Block a user