[SOLVED] UnInformative Y-grid lables

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
BorisL
Cacti User
Posts: 131
Joined: Sat Mar 31, 2007 9:21 am
Contact:

[SOLVED] UnInformative Y-grid lables

Post by BorisL »

Code: Select all

/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title=" - BGP - Imported Routes - " \
--base=1000 \
--height=150 \
--width=600 \
--alt-autoscale \
--vertical-label="routes" \
--slope-mode \
DEF:a="/usr/local/share/cacti/rra/routes_3736.rrd":routes:AVERAGE \
AREA:a#FF6044:"routes"  \
GPRINT:a:LAST:"Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf %s"  \
GPRINT:a:MIN:"Minimum\:%8.2lf %s\n" 
It seems that Using "--alt-autoscale" must involve adding '--alt-y-grid' to solve this.
[-Y|--alt-y-grid]

Place the Y grid dynamically based on the graph's Y range. The
algorithm ensures that you always have a grid, that there are
enough but not too many grid lines, and that the grid is met-
ric. That is the grid lines are placed every 1, 2, 5 or 10
units. This parameter will also ensure that you get enough dec-
imals displayed even if your graph goes from 69.998 to 70.001.
(contributed by Sasha Mikheev).
patch:

Code: Select all

>diff -au rrd.php~ rrd.php
--- rrd.php~    Mon May  7 21:39:14 2007
+++ rrd.php     Mon May  7 21:39:14 2007
@@ -584,7 +584,7 @@

        if ($graph["auto_scale"] == "on") {
                if ($graph["auto_scale_opts"] == "1") {
-                       $scale = "--alt-autoscale" . RRD_NL;
+                       $scale = "--alt-autoscale --alt-y-grid" . RRD_NL;
                }elseif ($graph["auto_scale_opts"] == "2") {
                        $scale = "--alt-autoscale-max" . RRD_NL;
                        $scale .= "--lower-limit=" . $graph["lower_limit"] . RRD_NL;
Attachments
With --alt-y-grid
With --alt-y-grid
Untitled-1.png (7.09 KiB) Viewed 7831 times
Without --alt-y-grid
Without --alt-y-grid
Untitled-1.png (7.7 KiB) Viewed 7835 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Support for --alt-y-grid is now part of current SVN
Reinhard
dolla
Posts: 19
Joined: Tue Oct 05, 2010 6:11 pm

Re:

Post by dolla »

gandalf wrote:Support for --alt-y-grid is now part of current SVN
Reinhard
Hi Reinhard,

is this removed from current version 0.8.7g?
i can't find any alt-y-grid support in the rrd.php.

rrd.php info:

=======================================
[root@localhost data]# ls -l /data/lib/rrd.php
-rw-r--r-- 1 apache apache 86208 Jul 9 2010 /data/lib/rrd.php
=======================================
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: [SOLVED] UnInformative Y-grid lables

Post by gandalf »

Sorry, I meant it's in trunk == 088 code
R.
dolla
Posts: 19
Joined: Tue Oct 05, 2010 6:11 pm

Re: [SOLVED] UnInformative Y-grid lables

Post by dolla »

gandalf wrote:Sorry, I meant it's in trunk == 088 code
R.
:lol: okey thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests