Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Autoscale with a fixed minimum. Or

 
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests
Author Message
Alain Tesio
Guest





PostPosted: Thu Oct 17, 2002 11:38 pm    Post subject: Autoscale with a fixed minimum. Or Reply with quote

Hi, I'd like to use the autoscale option for graphics but still keep the minimum at 0 (so an area twice bigger really means a value twice bigger)
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2235
Location: Carlisle, PA

PostPosted: Fri Oct 18, 2002 9:41 am    Post subject: Reply with quote

Yeah, I think that would be really cool too. I can think of a few situtions where it would make graphs looks nicer. Do you know if rrdtool can do this though? If it can, it should not be a problem for cacti to support it.

-Ian
Back to top
Alain Tesio



Joined: 19 Oct 2002
Posts: 7
Location: Paris, France

PostPosted: Sat Oct 19, 2002 6:02 pm    Post subject: Reply with quote

Hi, it's supported by rrdtool, the option --alt-autoscale-max only autoscales the maximum value, so you should set the configured lower limit, see the patch below.

Another problem in rrdtool is that the man page says that the default lower limit is 0, but using alt-autoscale-max with no explicit lower limit autoscales the lower limit anyway.

Code:

*** include/rrd_functions.php.orig      Sat Oct 19 16:57:19 2002
--- include/rrd_functions.php   Sat Oct 19 17:02:23 2002
***************
*** 362,367 ****
--- 362,368 ----
                                break;
                        case "2":
                                $scale .= "--alt-autoscale-max" . " \\\n";
+                               $scale = "--lower-limit=" . mysql_result($sql_id, 0, "upperlimit") . " \\\n";
                                break;
                }
Back to top
Alain Tesio



Joined: 19 Oct 2002
Posts: 7
Location: Paris, France

PostPosted: Sat Oct 19, 2002 6:34 pm    Post subject: Reply with quote

Sorry it's the wrong column in the mysql query
Back to top
bulek
Cacti Pro User


Joined: 20 May 2002
Posts: 852
Location: Poland

PostPosted: Sun Oct 20, 2002 6:03 am    Post subject: Reply with quote

I don't understand the disscusion I guess. Why don't you just use "--alt-autoscale-max" option in cacti Graph Configuration along with "Lower Limit" field? Seems to be simpler than patching the code.

- bulek
Back to top
Alain Tesio



Joined: 19 Oct 2002
Posts: 7
Location: Paris, France

PostPosted: Sun Oct 20, 2002 5:13 pm    Post subject: Reply with quote

That's the problem, if I do what you write cacti doens't run rrdgraph with the lower-limit option, my patch fixes this.
Back to top
bulek
Cacti Pro User


Joined: 20 May 2002
Posts: 852
Location: Poland

PostPosted: Sun Oct 20, 2002 5:28 pm    Post subject: Reply with quote

You are right, I've never noticed this. Good point!

Shouldn't your added line be the following (two changes in red)?

$scale .= "--lower-limit=" . mysql_result($sql_id, 0, "lowerlimit") . " \\\n";

- bulek
Back to top
Alain Tesio



Joined: 19 Oct 2002
Posts: 7
Location: Paris, France

PostPosted: Mon Oct 21, 2002 2:48 pm    Post subject: Reply with quote

yes sure !
Back to top
Guest






PostPosted: Fri Oct 25, 2002 3:45 am    Post subject: Reply with quote

THX a lot for this patch

Now the option "--alt-autoscale-max" works fine.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Feature Requests All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group