Merge branch 'master' of github.com:laf/librenms into smokeping

This commit is contained in:
laf
2015-07-07 19:58:37 +01:00
49 changed files with 588 additions and 64 deletions
@@ -197,7 +197,6 @@ if (isset($MetaGraphDefs[$type])) {
if(isset($rrd_cmd))
{
if ($config['rrdcached']) { $rrd_cmd .= " --daemon ".$config['rrdcached'] . " "; }
if ($_GET['from']) { $from = mres($_GET['from']); }
if ($_GET['to']) { $to = mres($_GET['to']); }
$rrd_cmd .= " -s " . $from . " -e " . $to;
+3 -1
View File
@@ -38,7 +38,9 @@ $graphfile = $config['temp_dir'] . "/" . strgen() . ".png";
$type = $graphtype['type'];
$subtype = $graphtype['subtype'];
$auth = is_client_authorized($_SERVER['REMOTE_ADDR']);
if ($auth !== true && $auth != 1) {
$auth = is_client_authorized($_SERVER['REMOTE_ADDR']);
}
include($config['install_dir'] . "/html/includes/graphs/$type/auth.inc.php");
if ($auth === true && is_file($config['install_dir'] . "/html/includes/graphs/$type/$subtype.inc.php")) {
+4 -2
View File
@@ -10,7 +10,10 @@ $rrd_options .= " COMMENT:' Last Max\\n'";
$rrd_options .= " DEF:sensor=$rrd_filename:sensor:AVERAGE";
$rrd_options .= " DEF:sensor_max=$rrd_filename:sensor:MAX";
$rrd_options .= " DEF:sensor_min=$rrd_filename:sensor:MIN";
$rrd_options .= " CDEF:sensorwarm=sensor_max,".$sensor['sensor_limit'].",GT,sensor,UNKN,IF";
if (isset($sensor['sensor_limit'])) {
$rrd_options .= " CDEF:sensorwarm=sensor_max,".$sensor['sensor_limit'].",GT,sensor,UNKN,IF";
$rrd_options .= " LINE1:sensorwarm#660000";
}
$rrd_options .= " CDEF:sensorcold=sensor_min,20,LT,sensor,UNKN,IF";
$rrd_options .= " AREA:sensor_max#c5c5c5";
$rrd_options .= " AREA:sensor_min#ffffffff";
@@ -19,7 +22,6 @@ $rrd_options .= " AREA:sensor_min#ffffffff";
# $rrd_options .= " AREA:sensorwarm#FFCCCC";
# $rrd_options .= " AREA:sensorcold#CCCCFF";
$rrd_options .= " LINE1:sensor#cc0000:'" . rrdtool_escape($sensor['sensor_descr'],28)."'";
$rrd_options .= " LINE1:sensorwarm#660000";
$rrd_options .= " GPRINT:sensor:LAST:%3.0lf%%";
$rrd_options .= " GPRINT:sensor:MAX:%3.0lf%%\\\\l";