Bug in edit of graph template

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

Moderators: Developers, Moderators

Post Reply
steveh@brendata.co.uk
Posts: 15
Joined: Mon Sep 08, 2003 7:40 am

Bug in edit of graph template

Post by steveh@brendata.co.uk »

If you edit a graph template and amend the text behind a label, then the resultant graph looks like this:

LINE3:a#FF5700:"Mail Discarded" \
GPRINT::AVERAGE:" Avg\:%8.2lf %s" \
GPRINT:a:MIN:" Minimum\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s" \
GPRINT:a:LAST:"Current\:%8.2lf %s\n" \
LINE1:b#F24AC8:"Mail Rejected" \
GPRINT::AVERAGE:" Avg\:%8.2lf %s" \
GPRINT:b:MIN:" Minimum\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s" \
GPRINT:b:LAST:"Current\:%8.2lf %s\n" \


i.e. it's missing the data source on the AVERAGE which is the label I changed, also the label text has become padded with spaces.
steveh@brendata.co.uk
Posts: 15
Joined: Mon Sep 08, 2003 7:40 am

Post by steveh@brendata.co.uk »

What I ended up doing was adding graph inputs for each of these and then I could reassign them, this fixed the problem, I guess if there isn't there should be a requirement to have each as a graph input?
steveh@brendata.co.uk
Posts: 15
Joined: Mon Sep 08, 2003 7:40 am

Post by steveh@brendata.co.uk »

However, that now brings another problem (0.8.4 with latest CVS patches just in case it fixed them...)

The graph template screen is correct, but the actual graph source is wrong, is there an order by missing somewhere?

/usr/local/rrdtool-1.0.45/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--title="Linux3 - Mail Counts" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Emails" \
DEF:a="/var/www/html/cacti/rra/linux3_mail_to_100.rrd":Defang:AVERAGE \
DEF:b="/var/www/html/cacti/rra/linux3_mail_to_100.rrd":mail_to:AVERAGE \
DEF:c="/var/www/html/cacti/rra/linux3_mail_to_100.rrd":mail_from:AVERAGE \
DEF:d="/var/www/html/cacti/rra/linux3_mail_to_100.rrd":mail_rejected:AVERAGE \
DEF:e="/var/www/html/cacti/rra/linux3_mail_to_100.rrd":mail_discarded:AVERAGE \
DEF:f="/var/www/html/cacti/rra/linux3_mail_to_100.rrd":Virus:AVERAGE \
DEF:g="/var/www/html/cacti/rra/linux3_mail_to_100.rrd":Spam:AVERAGE \
AREA:a#F5F800:"Processed By Defang" \
GPRINT:a:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:a:MIN:"Min\:%8.2lf %s" \
GPRINT:a:MAX:"Max\:%8.2lf %s" \
GPRINT:a:LAST:"Cur\:%8.2lf %s\n" \
GPRINT:d:LAST:"Cur\:%8.2lf %s\n" \
LINE1:b#96E78A:"Mail To" \
GPRINT:b:LAST:" Cur\:%8.2lf %s\n" \
LINE1:c#0000FF:"Mail From" \
LINE1:d#F24AC8:"Mail Rejected" \
GPRINT:d:AVERAGE:" Avg\:%8.2lf %s" \
GPRINT:d:MIN:"Min\:%8.2lf %s" \
GPRINT:c:LAST:"Cur\:%8.2lf %s\n" \
GPRINT:d:MAX:"Max\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:b:MIN:"Min\:%8.2lf %s" \
GPRINT:g:LAST:"Cur\:%8.2lf %s\n" \
GPRINT:b:MAX:"Max\:%8.2lf %s" \
LINE1:e#F51D30:"Mail Discarded" \
GPRINT:e:AVERAGE:" Avg\:%8.2lf %s" \
GPRINT:e:MIN:"Min\:%8.2lf %s" \
GPRINT:c:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:e:MAX:"Max\:%8.2lf %s" \
GPRINT:c:MIN:"Min\:%8.2lf %s" \
GPRINT:e:LAST:"Cur\:%8.2lf %s\n" \
GPRINT:c:MAX:"Max\:%8.2lf %s" \
LINE1:f#562B29:"Viruses Rejected" \
LINE1:g#000000:"Spam Rejected" \
GPRINT:f:AVERAGE:" Avg\:%8.2lf %s" \
GPRINT:g:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:f:MIN:"Min\:%8.2lf %s" \
GPRINT:g:MIN:"Min\:%8.2lf %s" \
GPRINT:f:MAX:"Max\:%8.2lf %s" \
GPRINT:f:LAST:"Cur\:%8.2lf %s\n" \
GPRINT:g:MAX:"Max\:%8.2lf %s"


However, checking the template the sequence numbers are correct and the screen looks ok?
steveh@brendata.co.uk
Posts: 15
Joined: Mon Sep 08, 2003 7:40 am

Post by steveh@brendata.co.uk »

Just popped in 0.8.5 and the same problem was there, so I've taken a look at the underlying data and the sequence numbers, whilst correct on the screen are wrong in the data, guess that the edit code needs to rewrite the data somewhere?
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Try applying the patch that I just posted to this forum. I would be curious to see if this makes the problem go away for you. This edit code was actually rewritten for 0.8.5, but as you probably know, new code means new bugs ;-).

-Ian
Guest

Post by Guest »

That fixed it (well, that and undoing some clearing up I had done - now I know what the entries with as local ID of 0 are for!!!!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests