[solved in 087c] Data Sources and DEFs

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

Moderators: Developers, Moderators

Borg
Posts: 4
Joined: Sat Aug 12, 2006 1:09 pm

[solved in 087c] Data Sources and DEFs

Post by Borg »

Hello.

I recently upgraded from 0.8.6 to 0.8.7b
Everything was fine except my smokeping graph. I noticed that
DEFs passed to RRDtool was changed.
This is how it looks after fixing it manualy
(I had to click on graph template, delete data sources, then click on every
importand Graph Item and click save to get data source..):
DEF:a="/home/www/virtual/cacti/rra/min_71.rrd":avg:AVERAGE \
DEF:b="/home/www/virtual/cacti/rra/min_71.rrd":min:AVERAGE \
DEF:c="/home/www/virtual/cacti/rra/min_71.rrd":loss:AVERAGE \
DEF:d="/home/www/virtual/cacti/rra/min_71.rrd":max:AVERAGE \
DEF:e="/home/www/virtual/cacti/rra/min_71.rrd":loss:MIN \
DEF:f="/home/www/virtual/cacti/rra/min_71.rrd":avg:MIN \
DEF:g="/home/www/virtual/cacti/rra/min_71.rrd":min:MIN \
DEF:h="/home/www/virtual/cacti/rra/min_71.rrd":max:MAX \

Before fix, AVARAGE was mixed w/ MIN/MAX.. so my CDEFs were not
working properly.

Now question, is there any way to understand how cacti adds those DEFs?
What make its to change the order of sources to RRDtool.
Can I enforce that order somehow?
This would really be helpfull when creating more complex CDEFs
when you cant use a single datasource (you specify None) and you access
all needed sources via a,b,c,...

Regards,
Borg
lozzd
Posts: 30
Joined: Thu Dec 08, 2005 7:13 pm
Contact:

Post by lozzd »

Have the developers ignored EVERYONES email on the subject of this? Because I haven't found a single post with a reply yet (apologies if that's just my poor searching, I've trawled through 7 pages of search results).

We've just "upgraded" from 0.8.7 to 0.8.7b and the only thing that's changed is now loads of our graphs that I've spent ages doing are broken, because suddenly every data source has 4 DEFs!
Why?! Where is the reasoning? I guess this doesn't affect too many people but I have some quite complex graphs referring to a,b,c etc which I now have to go back and change! Can I revert this to the old method?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

lozzd wrote:Have the developers ignored EVERYONES email on the subject of this? Because I haven't found a single post with a reply yet (apologies if that's just my poor searching, I've trawled through 7 pages of search results).

We've just "upgraded" from 0.8.7 to 0.8.7b and the only thing that's changed is now loads of our graphs that I've spent ages doing are broken, because suddenly every data source has 4 DEFs!
Why?! Where is the reasoning? I guess this doesn't affect too many people but I have some quite complex graphs referring to a,b,c etc which I now have to go back and change! Can I revert this to the old method?
I'm sorry for any inconvenience in this matter. But there's no supported method to "revert" anything.
In fact, from time to time, bugs are found and when fixing them there's a quite small change to break things that rely on the "old, but erraneous" behaviour.
Unfortunately, you've not left that much information for us to understand the exact problem you're encountering. And, in fact, not every installation shows this behaviour. To be honest, we're at least running some hundreds of those graphs mentioned in the first post without any change required after upgrade.
So please tell us what those graphs looked like before and after the change. Provide the whole rrdtool graph command, please.
Reinhard
lozzd
Posts: 30
Joined: Thu Dec 08, 2005 7:13 pm
Contact:

Post by lozzd »

Hi there,

Thanks for the quick response.

for example:

DEF:a="/var/www/cacti-0.8.7b/rra/rps_619.rrd":rps:AVERAGE \
DEF:b="/var/www/cacti-0.8.7b/rra/rps_619.rrd":rps:LAST \
DEF:c="/var/www/cacti-0.8.7b/rra/rps_619.rrd":rps:MIN \
DEF:d="/var/www/cacti-0.8.7b/rra/rps_619.rrd":rps:MAX \
DEF:e="/var/www/cacti-0.8.7b/rra/rps_819.rrd":rps:AVERAGE \
DEF:f="/var/www/cacti-0.8.7b/rra/rps_819.rrd":rps:LAST \
DEF:g="/var/www/cacti-0.8.7b/rra/rps_819.rrd":rps:MIN \
DEF:h="/var/www/cacti-0.8.7b/rra/rps_819.rrd":rps:MAX \

is for just 2 data sources. See how they're split out to AVERAGE, LAST, MIN, MAX?

before we upgraded, those two data sources would've looked just like this:

DEF:a="/var/www/cacti-0.8.7b/rra/rps_619.rrd":rps:AVERAGE \
DEF:b="/var/www/cacti-0.8.7b/rra/rps_819.rrd":rps:AVERAGE \

so the problem that has appeared is that instead of Cacti using my CDEFs as before (e.g. a,b,c,+,+ to add up the three data sources (but ignore d and e, for example) what the new cacti is doing is adding up data source 1' average, last, max and min!

Any CDEF that uses the DEF letters to add up things for another line, or legend item is ruined.

I'm not sure why it's been changed to work like this, but if you could tell me what's changed I'd love to know whether I could just change it back!

Thanks!
Laurie
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I guess it's lib/rrd.php around line 947 and 1588. Search for

Code: Select all

                /* if there is not a DEF defined for the current data source/cf combination, then we will have to
                improvise. choose the first available cf in the following order: AVERAGE, MAX, MIN, LAST */
No promise made ...
Ahh, and IMHO, this code is indeed WRONG. I would have changed it since weeks, if I only knew how not to break compatibilty, you know.

Reinhard
lozzd
Posts: 30
Joined: Thu Dec 08, 2005 7:13 pm
Contact:

Post by lozzd »

Heh, great. Not sure whether to just alter my CDEFs or change the source.

What bug is this change supposed to fix? I can't say I've had any issues.. Maybe that's because I work around them ;)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

lozzd wrote:What bug is this change supposed to fix? I can't say I've had any issues.. Maybe that's because I work around them ;)
Don't know. You may search the SVN to find out.
Reinhard
lozzd
Posts: 30
Joined: Thu Dec 08, 2005 7:13 pm
Contact:

Post by lozzd »

Is there a viewer without me having to check it out? The viewer listed on the website is 404: http://svn.cacti.net/cgi-bin/viewvc.cgi

and that's where the / of that domain goes to.

if not I guess I will download and search ;)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

SVN seems to be broken, currently
Reinhard
lozzd
Posts: 30
Joined: Thu Dec 08, 2005 7:13 pm
Contact:

Post by lozzd »

Oh :lol: No searching for me then. Any ideas when it'll be fixed?!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

It is on my discussion list for our meeting in August.
Reinhard
lozzd
Posts: 30
Joined: Thu Dec 08, 2005 7:13 pm
Contact:

Post by lozzd »

Are you actually kidding. I can't fix my cacti bug because your SVN is broken and you can't fix it for another month?! How do you guys do any work without SVN working?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Sorry, my answer was correct but it was the answer for "when do you suppose to fix the root cause", not an answer to "when will SVN be fixed". You may pm to Rony and/or Ian as the server admins
Reinhard
Donk
Posts: 1
Joined: Tue Jul 08, 2008 9:06 am

Post by Donk »

Hi,

I have the same problem as lozzd but I have upgrade from 0.8.6j to 0.8.7b.
Just 2 of my 50 graph templates have this bug.

Can I paste the CDEF's part of lib/rrd.php from the 0.8.6j to the 0.8.7b to "resolve" the bug.
lozzd
Posts: 30
Joined: Thu Dec 08, 2005 7:13 pm
Contact:

Post by lozzd »

gandalf wrote:Sorry, my answer was correct but it was the answer for "when do you suppose to fix the root cause", not an answer to "when will SVN be fixed". You may pm to Rony and/or Ian as the server admins
Reinhard
Ahhh, that makes more sense. Thanks!
I will try and get hold of them to fix the SVN.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests