Bug:changing Graph Template breaks graphs (DEF misses value)

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

Moderators: Developers, Moderators

Post Reply
infernix
Posts: 2
Joined: Fri Jul 11, 2003 6:40 am

Bug:changing Graph Template breaks graphs (DEF misses value)

Post by infernix »

Hi,

I'm running 0.8.2 as of yesterday. Fantastic work! Thanks alot! :)

A problem I noticed is that after adding two LINE1s to the Traffic (bytes/sec) template with MAX instead of AVERAGE (to produce MRTG-like graphs), the Traffic graphs stop working. When I run the output of the 'source' link on such a graph. RRDTOOL gives me:

ERROR: opening '': No such file or directorya

This seems obvious if you look at it:

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--title="box - Traffic - 10.1.1.1 (eth0)" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per second" \
DEF:a="/var/www/cacti/rra/box_traffic_in_37.rrd":traffic_in:AVERAGE \
DEF:b="":traffic_in:MAX \
DEF:c="/var/www/cacti/rra/box_traffic_in_37.rrd":traffic_out:AVERAGE \
DEF:d="":traffic_out:MAX \
AREA:a#00CF00:"Inbound"  \
GPRINT:a:LAST:"         Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:b#FFF200:"Max. traffic in"  \
LINE1:c#002A97:"Outbound"  \
GPRINT:c:LAST:"        Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:c:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:d#FF5700:"Max. traffic out\n" 
DEF:b and DEF:d were added; however, it does not insert the rrd file (/var/www/cacti/rra/box_traffic_in_37.rrd), which results in the error above.

Is there a way I can fix this manually until its fixed, e.g. through phpmysql?

Thanks,

infernix
Guest

Post by Guest »

Even more oddness.

Instead of adding two LINE1 lines, simply changing the standard 'Interface - Traffic (bytes/sec) graph' AVERAGE CF types for Inbound and Outbound to MAX break stuff. Compare:

Code: Select all

DEF:a="/var/www/cacti/rra/box_traffic_in_37.rrd":traffic_in:AVERAGE \
DEF:b="/var/www/cacti/rra/box_traffic_in_37.rrd":traffic_out:AVERAGE \
AREA:a#00CF00:"Inbound"  \
GPRINT:a:LAST:" Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:b#002A97:"Outbound"  \
GPRINT:b:LAST:"Current\:%8.2lf %s"  \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"
With:

Code: Select all

DEF:a="/var/www/cacti/rra/box_traffic_in_37.rrd":traffic_in:MAX \
DEF:b="/var/www/cacti/rra/box_traffic_in_37.rrd":traffic_out:MAX \
AREA:a#00CF00:"Inbound"  \
GPRINT::LAST:" Current\:%8.2lf %s"  \
GPRINT::AVERAGE:"Average\:%8.2lf %s"  \
GPRINT::MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:b#002A97:"Outbound"  \
GPRINT::LAST:"Current\:%8.2lf %s"  \
GPRINT::AVERAGE:"Average\:%8.2lf %s"  \
GPRINT::MAX:"Maximum\:%8.2lf %s\n"
You'll notice that, after changing AVERAGE to MAX, the GPRINT: lines miss their reference (a and b).

Or am I trying to do something impossible here?

Thanks!

infernix
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

What you are trying to do this very possible. What you have done so far is correct, but I think you missed a step. After adding the two LINE1 items to the graph template, you must include these items in the "Graph Item Inputs". The "Inbound Data Source" input will include the MAX-IN item, and the "Outbound Data Source" will include the MAX-OUT item.

Let me know if you have any more problems or questions.

-Ian
Guest

Post by Guest »

Hi,

I followed your advice (which is obvious - sorry for missing that), but now something really odd has happened: all the DEF: lines point to a nonexistent rrd file (/var/www/cacti/rra/box_infernix_net_traffic_in_88.rrd), for *all* the graphs. Yep, on all traffic input graphs for all hosts, all DEF: lines point to this file.

Is there something that needs to be regenerated or cleared?

Thanks,

infernix
infernix
Posts: 2
Joined: Fri Jul 11, 2003 6:40 am

Post by infernix »

Well, I cleared the poller cache a few times, which didn't help. Then I just manually set the Graph Item Inputs for each graph (they were all set to None), but its fortunate that I only have 10 graphs.

Is this normal behaviour?

Thanks,

infernix
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

I am glad you got things working, but you definitely should not have to "touch" each graph. I addressed a bug for version 0.8.2 that supposedly fixed the exact issue you are having now. I am going to try and re-produce the buggy condition, but you may want to come up with a set of steps to reproduce the problem just in case.

-Ian
Wyvern
Posts: 9
Joined: Mon Jul 28, 2003 2:51 am

Post by Wyvern »

raX wrote:I am glad you got things working, but you definitely should not have to "touch" each graph. I addressed a bug for version 0.8.2 that supposedly fixed the exact issue you are having now. I am going to try and re-produce the buggy condition, but you may want to come up with a set of steps to reproduce the problem just in case.

-Ian
I am running Cacti 0.8.2a and the only way I could fix the error with the DEF's was to delete the Data Source pointing at the template, then when I recreated the DS it worked fine.

Seeya,
Warrick
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

I would like to fix this problem, but I cannot seem to find the correct list of steps to reproduce it. Could either of you re-create this problem using a fresh install of 0.8.2a? If so, could you post your steps here?

-Ian
Wyvern
Posts: 9
Joined: Mon Jul 28, 2003 2:51 am

Post by Wyvern »

raX wrote:I would like to fix this problem, but I cannot seem to find the correct list of steps to reproduce it. Could either of you re-create this problem using a fresh install of 0.8.2a? If so, could you post your steps here?

-Ian
Hi Ian,

I haven't had a chance to reinstall cacti from scratch, but I will give it a go tomorrow. Got to build a new monitoring server for the network.

On a different note how fast is the new poller? As we are looking at monitoring approximately 15,000 mib variables every 5 minutes.

Thanks,
Warrick
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Wyvern wrote:On a different note how fast is the new poller? As we are looking at monitoring approximately 15,000 mib variables every 5 minutes.
It is a lot faster than the current php-based poller. Not only is it written in c, but it is multi-threaded as well. Let me know if you decide to go this route because I am more than willing to help you debug any problems that you encounter. I have yet to test cactid with 15,000+ items, but I see no reason why this would not work.

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest