fix potential bug with erroneous space in collectd graphs

git-svn-id: http://www.observium.org/svn/observer/trunk@1330 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-07-10 12:09:21 +00:00
parent fc8c8cf3ed
commit d3c2f2b5e4
3 changed files with 4 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ $config['rrd_interval'] = 10;
// Average rows/rra (currently ignored)
$config['rrd_rows'] = 2400;
// Additional options to pass to rrdgraph
$config['rrd_opts'] = (isset($config['rrdgraph_defaults']) ? $config['rrdgraph_defaults'] : '');
#$config['rrd_opts'] = (isset($config['rrdgraph_defaults']) ? $config['rrdgraph_defaults'] : '');
#$config['rrd_opts'] = array('-E', "-c", "SHADEA#a5a5a5", "-c", "SHADEB#a5a5a5", "-c", "FONT#000000", "-c", "CANVAS#FFFFFF", "-c", "GRID#aaaaaa",
# "-c", "MGRID#FFAAAA", "-c", "FRAME#3e3e3e", "-c", "ARROW#5e5e5e", "-R", "normal");
// Predefined set of colors for use by collectd_draw_rrd()

View File

@@ -47,7 +47,7 @@ $config['snmp']['retries'] = 6; # how many times to retry the query
### Cosmetics
$config['rrdgraph_def_text'] = " -c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF -c GRID#a5a5a5";
$config['rrdgraph_def_text'] = "-c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF -c GRID#a5a5a5";
$config['rrdgraph_def_text'] .= " -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal";
$config['overlib_defaults'] = ",FGCOLOR,'#ffffff', BGCOLOR, '#e5e5e5', BORDER, 5, CELLPAD, 4, CAPCOLOR, '#555555', TEXTCOLOR, '#3e3e3e'";

View File

@@ -193,6 +193,7 @@ $device_types = array('server','network','firewall','workstation','printer','pow
$config['version'] = "0.10";
$config['rrdgraph_def_text'] = str_replace(" ", " ", $config['rrdgraph_def_text']);
$config['rrd_opts_array'] = explode(" ", trim($config['rrdgraph_def_text']));
if(!$config['mibdir'])
@@ -217,7 +218,7 @@ if(isset($_SERVER['HTTPS'])) {
### Connect to database
$observer_link = mysql_pconnect($config['db_host'], $config['db_user'], $config['db_pass']);
if (!$observer_link) {
echo "<h2>Observer MySQL Error</h2>";
echo "<h2>MySQL Error</h2>";
echo mysql_error();
die;
}