From 554cdb8479474232a97fdfa390826b79cd798ef5 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Tue, 24 Mar 2009 16:18:02 +0000 Subject: [PATCH] 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 --- README | 2 ++ config.php.default | 4 ++-- includes/graphing.php | 9 +++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README b/README index 3969af6e3d..7f9835d0a5 100644 --- a/README +++ b/README @@ -30,6 +30,8 @@ Please see http://www.observernms.org. Changelog --------- +Added Pseudowire menu entry and configuration option + Release 0.5.0 ( 24 March 2009 ) Cleaned up a lot of hardcoded paths diff --git a/config.php.default b/config.php.default index 547b4c4cf6..c342c2f317 100755 --- a/config.php.default +++ b/config.php.default @@ -88,8 +88,8 @@ $config['syslog_age'] = "1 month"; ## Time to keep syslog for in ### Interface name strings to ignore $config['bad_if'] = array("null", "virtual-", "unrouted", "eobc", "mpls", "sl0", "lp0", "faith0", - "-atm layer", "-atm subif", "-shdsl", "-adsl", "-aal5", "-atm", - "async", "plip", "-physical", "-signalling", "control plane", + "-atm layer", "-atm subif", "-shdsl", "-adsl", "-aal5", "-atm", "stackport", + "async", "plip", "-physical", "-signalling", "control plane", "stacksub", "bri", "-bearer", "ng", "bluetooth", "isatap", "ras", "qos", "miniport"); ### Mountpoints to ignore diff --git a/includes/graphing.php b/includes/graphing.php index 0325c85e45..f163db923b 100644 --- a/includes/graphing.php +++ b/includes/graphing.php @@ -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";