[FOUND QUICK FIX] Data Source troubles after 0.8.7a upgrade

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

Moderators: Developers, Moderators

Post Reply
elliott
Posts: 4
Joined: Mon Jan 14, 2008 5:21 pm
Location: Oakland, CA USA

[FOUND QUICK FIX] Data Source troubles after 0.8.7a upgrade

Post by elliott »

Hi I just upgraded this weekend to 0.8.7a from 0.8.6j and for the most part everything is great with the new version.

Today I attempted to add a script/command based graph and for some reason I get the following data source error:

Code: Select all

Data Source Debug



Notice:  Undefined index:   in /var/www/cacti/htdocs/lib/rrd.php on line 225

/usr/bin/rrdtool create \
/var/www/cacti/htdocs/rra/wiki_rep_time_3854.rrd \
--step 300  \
DS:rep_time:GAUGE:600:0:U \
RRA::0.5:1008:1044 \
RRA:AVERAGE:0.5:1:500 \
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:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:500 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \
Line 225 from rrd.php seems to be looping through each rra for the data source and pieces it together each "RRA:" line. For some reason the first RRA line doesn't have a consolidation function.

I've tried a few times to drop and recreate the data source, data template, and graph templates, but each time I get similar results.

Did something change between revisions that I just not picking up on, or maybe something wrong in my environment?

Thanks,
-Elliott Johnson
Last edited by elliott on Tue Jan 15, 2008 3:00 pm, edited 1 time in total.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

What type of script is it? Got a link to it?

Have you patched cacti?
Do you have the plugin arch installed?
elliott
Posts: 4
Joined: Mon Jan 14, 2008 5:21 pm
Location: Oakland, CA USA

Post by elliott »

BSOD2600 wrote:What type of script is it? Got a link to it?
It is a wrapper script for a database query which returns an integer value in the following form:

Code: Select all

rep_time:23
BSOD2600 wrote:Have you patched cacti?
I am using a vanilla cacti 0.8.7a install. I installed it via gentoo and ran their webapp-config program which does some linking if I understand it correctly. I guess that could have introduced a problem, so I ran a `cmp` on lib/rrd.php versus the same file from the cacti source and they are the same.
BSOD2600 wrote:Do you have the plugin arch installed?
Nope. I did a quick read up on what that is. Do you recommend it?

-Elliott
elliott
Posts: 4
Joined: Mon Jan 14, 2008 5:21 pm
Location: Oakland, CA USA

Fixed

Post by elliott »

I found the issue. It could possibly be a bug, but removing the "half decade" rra from the data template allows the rrd to be created.

What is the protocol for entering a bug report?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Fixed

Post by BSOD2600 »

elliott wrote:I found the issue. It could possibly be a bug, but removing the "half decade" rra from the data template allows the rrd to be created.
half decade? Thats not a standard timespan.
elliott wrote:What is the protocol for entering a bug report?
http://www.cacti.net/bugs.php
pachu
Posts: 8
Joined: Tue May 08, 2007 2:49 pm

Post by pachu »

helo !

i´am having the same problem !!!

i can graph somes graphs but now i can´t graph anything



Notice: Undefined index: in /opt/lampp/htdocs/cacti/lib/rrd.php on line 225

Notice: Undefined index: in /opt/lampp/htdocs/cacti/lib/rrd.php on line 225


There are any solution ??

(sorry but my english is too horrible !! )
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This is which version of cacti, please?
Reinhard
pachu
Posts: 8
Joined: Tue May 08, 2007 2:49 pm

Post by pachu »

my version is cacti-0.8.7a.tar.gz
pachu
Posts: 8
Joined: Tue May 08, 2007 2:49 pm

Post by pachu »

look that :

ON DEVICES :

Descr.. Graphs Data Sources Status Hostname Current Average Availability
GOOGLE 1 1 Up 209.85.165.147 182.4 185.34 99.55

ON DATA SOURCES :

GOOGLE - Smoke Ping Ping Latency 1 Minute Yes Ping Latency


Data Source Debug


Notice: Undefined index: in /opt/lampp/htdocs/cacti/lib/rrd.php on line 225

Notice: Undefined index: in /opt/lampp/htdocs/cacti/lib/rrd.php on line 225
/usr/local/rrdtool-1.2.26/bin/rrdtool create \
/opt/lampp/htdocs/cacti/rra/google_loss_33.rrd \
--step 60 \
DS:min:GAUGE:120:0:500 \
DS:dev:GAUGE:120:0:500 \
DS:max:GAUGE:120:0:500 \
DS:avg:GAUGE:120:0:500 \
DS:loss:GAUGE:120:0:120 \
RRA::0.5:1:864 \
RRA::0.5:1:25920 \
RRA:AVERAGE:0.5:1:500 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:1:4320 \
RRA:AVERAGE:0.5:1:8928 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:1:25920 \
RRA:AVERAGE:0.5:1:25920 \
RRA:AVERAGE:0.5:1:44640 \
RRA:AVERAGE:0.5:5:25920 \
RRA:AVERAGE:0.5:6:35040 \
RRA:AVERAGE:0.5:288:797 \
RRA:AVERAGE:0.5:6:44640 \
RRA:AVERAGE:0.5:24:13140 \
RRA:AVERAGE:0.5:30:25920 \
RRA:AVERAGE:0.5:30:35040 \
RRA:AVERAGE:0.5:120:13140 \
RRA:AVERAGE:0.5:180:35040 \
RRA:AVERAGE:0.5:720:13140 \
RRA:MAX:0.5:1:500 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \


ON GRAPHS MANAGEMENTE :

RRDTool Command:

/usr/local/rrdtool-1.2.26/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="GOOGLE - Smoke Ping" \
--base=1000 \
--height=120 \
--width=500 \
--upper-limit=10 \
--lower-limit=0 \
--units-exponent=1 \
--vertical-label="milliseconds" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/opt/lampp/htdocs/cacti/rra/google_loss_33.rrd":avg:AVERAGE \
DEF:b="/opt/lampp/htdocs/cacti/rra/google_loss_33.rrd":max:AVERAGE \
DEF:c="/opt/lampp/htdocs/cacti/rra/google_loss_33.rrd":min:AVERAGE \
DEF:d="/opt/lampp/htdocs/cacti/rra/google_loss_33.rrd":loss:AVERAGE \
DEF:e="/opt/lampp/htdocs/cacti/rra/google_loss_33.rrd":max:MAX \
CDEF:cdefb=b,a,-,0.2,* \
CDEF:cdefh=a,c,-,0.2,* \
CDEF:cdefbc=e,0,* \
CDEF:cdefbd=d,0,GT,UNKN,a,IF \
CDEF:cdefbe=d,0,GT,d,40,GT,UNKN,c,IF,UNKN,IF \
CDEF:cdefbf=d,40,GT,d,80,GT,UNKN,c,IF,UNKN,IF \
CDEF:cdefbg=d,UN,1,EQ,TIME,300,+,NOW,GT,UNKN,INF,IF,d,80,GT,INF,UNKN,IF,IF \
CDEF:cdefbh=d,UN,1,EQ,TIME,300,+,NOW,GT,100,0,IF,100,d,-,IF \
AREA:a#FFFFFFFF:"" \
AREA:cdefb#333333FF:"":STACK \
AREA:cdefb#555555FF:"":STACK \
AREA:cdefb#888888FF:"":STACK \
AREA:cdefb#AAAAAAFF:"":STACK \
AREA:cdefb#CCCCCCFF:"":STACK \
AREA:c#FFFFFFFF:"" \
AREA:cdefh#CCCCCCFF:"":STACK \
AREA:cdefh#AAAAAAFF:"":STACK \
AREA:cdefh#888888FF:"":STACK \
AREA:cdefh#555555FF:"":STACK \
AREA:cdefh#333333FF:"":STACK \
AREA:cdefbc#FFFFFFFF:"" \
LINE1:cdefbd#00CF00FF:"Up" \
AREA:cdefbe#4123A1FF:"Packet loss \: 1 -> 40 %" \
AREA:cdefbf#8F005CFF:"Packet loss 41 -> 80 %" \
AREA:cdefbg#FF0000FF:"Down\n" \
GPRINT:cdefbh:AVERAGE:"Success rate \:%8.2lf %%\n" \
COMMENT:"Response time \:" \
GPRINT:c:MIN:"Minimum \:%8.2lf ms" \
GPRINT:a:AVERAGE:"Average \:%8.2lf ms" \
GPRINT:e:MAX:"Maximum \:%8.2lf ms\n"
RRDTool Says:

ERROR: opening '/opt/lampp/htdocs/cacti/rra/google_loss_33.rrd': No such file or directory
Adwim Kalfsterman
Posts: 5
Joined: Mon Feb 18, 2008 10:56 am

Solution

Post by Adwim Kalfsterman »

Hello,

You can solve the problem doing the following:
Goto Console-Data Sources-RRAs-Hourly (1 Minute Average)

Make sure you selected at least one consolidation function (AVERAGE/MIN/MAX/LAST.

I think normally AVERAGE/MAX and LAST are selected!

This solves the problem.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This issue should be solved with 087b. Please verify
Reinhard
Adwim Kalfsterman
Posts: 5
Joined: Mon Feb 18, 2008 10:56 am

Not resolved in 0.8.7b

Post by Adwim Kalfsterman »

I'm using 0.8.7b and experienced the problem, so it's not solved in this version!!

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

Re: Not resolved in 0.8.7b

Post by gandalf »

Adwim Kalfsterman wrote:I'm using 0.8.7b and experienced the problem, so it's not solved in this version!!

Regards, Adwim
Is it possible to post the rrdtool graph from a failing one? Your workaround is ok, but I'd like to really fix the issue.
Reinhard
Adwim Kalfsterman
Posts: 5
Joined: Mon Feb 18, 2008 10:56 am

More specific

Post by Adwim Kalfsterman »

Gandalf,

Please be more specific, because I don't know what you mean.

We you do, I'll send you the information.

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

Post by gandalf »

If possible, revert to the "failing" szenario. Then, visit graph management, select a failing graph and switch to debug. Post the whole rrdtool graph statement. Then, activate the workaround again.
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests