Stacking Data?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
DavidM
Posts: 34
Joined: Sat Feb 08, 2003 9:52 pm

Stacking Data?

Post by DavidM »

Ok, I have two graphs capturing number of connections for MSSQL Server. I've compared the number of connections per server to the graph and the Y axis, Last/Min/Max seem to be correct.

The problem is, I'm trying to combine the data from the two graphs into one graph and the data looks like it is being added together.

Have have both graphs set to Gauge.

Here is source:

Code: Select all

/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start="-86400" \
--title="test_snmpget_both" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--vertical-label="Connections" \
DEF:a="/var/www/html/cacti/rra/test_getnext.rrd":test_getnext:AVERAGE \
DEF:b="/var/www/html/cacti/rra/test_getnext_2uwek.rrd":test_getnext:AVERAGE \
CDEF:cdefa=a,300,* \
CDEF:cdefe=b,300,* \
AREA:cdefa#0000FF:"Average" \
GPRINT:a:LAST:"Current\:%8.0lf" \
GPRINT:a:MIN:"Minimum\:%8.0lf" \
GPRINT:a:MAX:"Maximum\:%8.0lf\n" \
STACK:cdefe#00A348:"Average" \
GPRINT:b:LAST:"Current\:%8.0lf" \
GPRINT:b:MIN:"Minimum\:%8.0lf" \
GPRINT:b:MAX:"Maximum\:%8.0lf\n" 
What am I doing wrong? This is driving me nuts!
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

So what's the problem actually? What exactly do you want to get? Stacked graphs present data series each on top of previous one... so they look like added together. What do you mean by "combine"?

- bulek
DavidM
Posts: 34
Joined: Sat Feb 08, 2003 9:52 pm

Post by DavidM »

When I say combine, I simply want to see both graphs (from two separate servers) showing up on one graph with different colors.

It looks like when using Stack, that the data from the two are added together forming one graph and only showing one color.
ranc0r
Posts: 9
Joined: Fri Nov 15, 2002 7:42 pm

Re: Stacking Data

Post by ranc0r »

Simple enough. You want the second item to be either an Area or a Line entry. This will put them on the same graph without adding them.
DavidM
Posts: 34
Joined: Sat Feb 08, 2003 9:52 pm

Post by DavidM »

OK--I seemed to not get the results I was looking for. Howver, changing the first both items to Line2 seems to display them correctly.

Code: Select all

/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start="-86400" \
--title="test_snmpget_both" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--vertical-label="Connections" \
DEF:a="/var/www/html/cacti/rra/test_getnext.rrd":test_getnext:AVERAGE \
DEF:b="/var/www/html/cacti/rra/test_getnext_2uwek.rrd":test_getnext:AVERAGE \
LINE2:b#00A348:"2UW2K" \
GPRINT:b:LAST:"Current\:%8.0lf" \
GPRINT:b:MIN:"Minimum\:%8.0lf" \
GPRINT:b:MAX:"Maximum\:%8.0lf\n" \
LINE2:a#0000FF:"U2W2K" \
GPRINT:a:LAST:"Current\:%8.0lf" \
GPRINT:a:MIN:"Minimum\:%8.0lf" \
GPRINT:a:MAX:"Maximum\:%8.0lf\n"  
Now, how do I change the Y axis to display without the decimal plus 0? Currently it displays as 8.0, 10.0, 12.0, 14.0, I have each data item set for "Exact".
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

If you still would like to use stacked graph then I suspect your previous problem was caused by bug in cacti handling "--autoscale-max" option. A simple patch for this can be found here:
http://www.raxnet.net/board/viewtopic.php?t=893

- bulek
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests