mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
fixed temperature graphing with unusual characters and added 3750 stackwise interfaces to ignored list (thanks Dario Calami)
git-svn-id: http://www.observium.org/svn/observer/trunk@377 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -75,12 +75,13 @@ function temp_graph ($temp, $graph, $from, $to, $width, $height, $title, $vertic
|
||||
$temperature['temp_descr_fixed'] = str_pad($temperature['temp_descr'], 28);
|
||||
$temperature['temp_descr_fixed'] = substr($temperature['temp_descr_fixed'],0,28);
|
||||
|
||||
$temprrd = addslashes("rrd/$hostname/temp-" . str_replace("/", "_", str_replace(" ", "_",$temperature['temp_descr'])) . ".rrd");
|
||||
$temprrd = str_replace(")", "_", $temprrd);
|
||||
$temprrd = str_replace("(", "_", $temprrd);
|
||||
$filename = str_replace(")", "_", str_replace("(", "_", str_replace("/", "_", str_replace(" ", "_",$temperature['temp_descr']))));
|
||||
|
||||
|
||||
$temprrd = $config['rrd_dir'] . "/$hostname/temp-" . $filename . ".rrd";
|
||||
$opts[] = "DEF:temp=$temprrd:temp:AVERAGE";
|
||||
$opts[] = "CDEF:tempwarm=temp,".$temperature[temp_limit].",GT,temp,UNKN,IF";
|
||||
$opts[] = "LINE1.5:temp#006600:" . $temperature[temp_descr_fixed];
|
||||
$opts[] = "LINE1.5:temp#006600:'" . trim($temperature[temp_descr_fixed]) . "'";
|
||||
$opts[] = "LINE1.5:tempwarm#cc0000";
|
||||
$opts[] = "GPRINT:temp:LAST:%3.0lf°C";
|
||||
$opts[] = "GPRINT:temp:MAX:%3.0lf°C\\\l";
|
||||
|
||||
Reference in New Issue
Block a user