On Thu, Sep 10, 2009 at 13:28, Daniel Pocock <dan...@pocock.com.au> wrote:
>>>> The reason I didn't put $rrd_options in conf.php is because it's value
>>>> is meant to be derived from other variables, in other words, the
>>>> administrator should not change $rrd_options itself.
>>>>
>>>> However, if get_context.php is not always read, then maybe there is
>>>> another approach: I can create a `do not touch/advanced users only'
>>>> section at the bottom of conf.php, and things like $rrd_options can go
>>>> there.
>>>>
>>>>
>>> I haven't seen any other comments on this, so it's now at the  bottom of
>>> conf.php.in
>>>
>>
>> The only problem that I can think is that since conf.php doesn't get
>> updated automatically by packaging tools (you don't want to overwrite
>> the admins changes) a minor update is now more complicated than it
>> should be. I'll prefer to see not admin changeable variables somewhere
>> else than conf.php if they are required.
>>
> Good point - I've now created eval_config.php, and that pulls in
> conf.php before creating the derived values

This still doesn't seem to work in trunk.  I'm still getting undefined
errors from line 267 in functions.php.  However, it seems we may be
making this much harder than needed.


[becker...@saturn ~/ganglia/versions/trunk/monitor-core/web]$ svn diff
-x -w -c 2068
Index: functions.php
===================================================================
--- functions.php       (revision 2067)
+++ functions.php       (revision 2068)
@@ -223,6 +223,10 @@
       {
          $out = array();

+         # If $rrd_options isn't set from conf.php or eval_config.php
+         if (!isset($rrd_options))
+            $rrd_options = '';
+
          $rrd_dir = "$rrds/$clustername/$host";
          if (file_exists("$rrd_dir/$metricname.rrd")) {
             $command = RRDTOOL . " graph /dev/null $rrd_options ".
@@ -263,6 +267,10 @@
    else
      $sum_dir = "$rrds/$clustername/__SummaryInfo__";

+    # If $rrd_options isn't set from conf.php or eval_config.php
+    if (!isset($rrd_options))
+        $rrd_options = '';
+
    $command = RRDTOOL . " graph /dev/null $rrd_options ".
      "--start $start --end $end ".
      "DEF:avg='$sum_dir/$metricname.rrd':'sum':AVERAGE ".


-- 
Jesse Becker

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to