Losing maximum values on graphs - Citrix connections

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

Moderators: Developers, Moderators

Post Reply
carguy
Posts: 3
Joined: Wed Jan 07, 2004 11:15 am

Losing maximum values on graphs - Citrix connections

Post by carguy »

I would think this has to be an easy and common question but haven't found the answer in my searches. We have been using Cacti for a long time now to graph a lot of things, currently on 0.8.2a.

I wrote a data source script to grab the current number of active and disconnected citrix sessions in use on a couple of our Sun servers (license capacity planning/monitoring). I created the data source and graphs for each server (daily, weekly, monthly, yearly) in Cacti and everything seemed to be working as expected. Problem is, it does not seem to be keeping my maximum values. For instance, one server had a total of 11 connections when I first set it up. 11 was the max all the way through, until it rolled off the mothly graph and now the yearly has dropped to 8. It seems there is some unwanted averaging going on where I want the maximum values retained.

Here is my data source:

Code: Select all

/usr/bin/rrdtool create \
/var/www/html/cacti/rra/citrix_searay.rrd \
--step 300  \
DS:act:GAUGE:600:0:100000 \
DS:dis:GAUGE:600:0:100000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
and one of my yearly graph source:

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-33053184 \
--end=-0s \
--title="Citrix Users on Searay" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Citrix Users" \
DEF:a="/var/www/html/cacti/rra/citrix_searay.rrd":act:AVERAGE \
DEF:b="/var/www/html/cacti/rra/citrix_searay.rrd":dis:AVERAGE \
CDEF:cdefi=a,b,+ \
AREA:a#00FF00:"Active"  \
GPRINT:a:LAST:"      Current\:%4.0lf"  \
GPRINT:a:AVERAGE:"Average\:%4.0lf"  \
GPRINT:a:MAX:"Maximum\:%4.0lf\n"  \
STACK:b#0000FF:"Disconnected"  \
GPRINT:b:LAST:"Current\:%4.0lf"  \
GPRINT:b:AVERAGE:"Average\:%4.0lf"  \
GPRINT:b:MAX:"Maximum\:%4.0lf\n"  \
LINE1:cdefi#000000:"Total"  \
GPRINT:cdefi:LAST:"       Current\:%4.0lf"  \
GPRINT:cdefi:AVERAGE:"Average\:%4.0lf"  \
GPRINT:cdefi:MAX:"Maximum\:%4.0lf\n" 
Where I believe the problem is coming in is in the DEF lines using the AVERAGE consolidation function. I believe it should be using MAX in order for the maximums to be retained. Problem is, I can't find anywhere in Cacti that allows me to change that from AVERAGE to something else.

The maximums are all I really care about and need to be accurate. Another current example of a server showing wrong information for my purposes is our standy citrix machine that sees little activity. The current daily graph shows 0 active, 0 disconnected, and 0 total which is correct. The current weekly graph also shows 0 connections across the board which is also correct as nobody has connected to it in that amount of time. The first week of the monthly graph shows the highest number of connections with 1 active, 2 disconnected, and 3 total which I believe to be correct although I think it is possible that it could be wrong. Now where it is noticably wrong is in the yearly graph where it shows 0 active, 1 disconected, and 2 total. NOTE that all of the above numbers come from the GPRINT MAX columns on the graphs, the ones that mean the most to me.

It seems like this would be a simple and normal need, much like plain old maximum logged in users but I've looked at logged in user graphs as an example and they seem to be set up the same way. I feel like I am missing something simple but I've worked through it with a coworker and we're both stumped. Thanks for any help/suggestions!
Bisonlux
Cacti User
Posts: 79
Joined: Wed Jul 23, 2003 4:35 pm
Location: Luxembourg

Post by Bisonlux »

You are right.
For the moment it isn't possible to do that with Cacti. (I tried with version 0.8.4).

What you can do is modifying and executing the graph source manually to check if it generates the graph you expect.


Modify the DEF as you say:

Code: Select all

DEF:a="/var/www/html/cacti/rra/citrix_searay.rrd":act:MAX \ 
DEF:b="/var/www/html/cacti/rra/citrix_searay.rrd":dis:MAX \
Bye
carguy
Posts: 3
Joined: Wed Jan 07, 2004 11:15 am

Post by carguy »

Why didn't I think of that? I modified the DEFs in a test script to create the yearly image and the MAX jumped from 8 to 15 which is what I would expect. Now, wonder where the best place to start hacking would be? :) I suppose I could create a separate standalone PHP page for these but I would rather not....

Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest