CDEFs wont work with MYSQL Warning.

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

Moderators: Developers, Moderators

Post Reply
Guest

CDEFs wont work with MYSQL Warning.

Post by Guest »

I'm testing Cacti for a few days now, but I still have one problem. Always when I add a CDEF function to a graph, the graphic will not be shown. The source always shows the following:
Any Idea?
Without CDEF the graph will be drawed.

Warning: Supplied argument is not a valid MySQL result resource in include/rrd_functions.php on line 573

/usr/local/rrdtool-1.0.35/bin/rrdtool graph - \
--imgformat=PNG \
--start="-86400" \
--title="Load Average" \
--rigid \
--base=1000 \
--height=150 \
--width=500 \
--alt-autoscale-max \
--vertical-label="Average Load" \
DEF:a="/usr/local/httpd/htdocs/cacti/rra/system_loadavg.rrd":1min:AVERAGE \
DEF:b="/usr/local/httpd/htdocs/cacti/rra/system_loadavg.rrd":10min:AVERAGE \
DEF:c="/usr/local/httpd/htdocs/cacti/rra/system_loadavg.rrd":5min:AVERAGE \
CDEF:cdefd=a,b,c,+,+,3,/ \
AREA:b#FFD660:"10 Minute\: 0.32" \
STACK:c#EA8F00:"5 Minute\: 0.17\n" \
STACK:a#FF0000:"1 Minute\: 0.01\n" \
AREA:cdefd#:""
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

It actually seems as if your CDEF string IS being generated correctly. The last line of your source flags me though:

AREA:cdefd#:""

Check to make sure you have a color selected for that item and try typing some text in the "text format" field and see if that makes any difference.

-Ian
Guest

not better

Post by Guest »

(Username US forgot PWD)
It doesn't work.
I think, I will install cacti again with a newer php (now 4.03) and a newer linux version(kernel 2.2.14)(MySQL 3.22.32).

Still:

Warning: Supplied argument is not a valid MySQL result resource in include/rrd_functions.php on line 573

...
DEF:a="/usr/local/httpd/htdocs/cacti/rra/system_loadavg.rrd":1min:AVERAGE \
DEF:b="/usr/local/httpd/htdocs/cacti/rra/system_loadavg.rrd":10min:AVERAGE \
DEF:c="/usr/local/httpd/htdocs/cacti/rra/system_loadavg.rrd":5min:AVERAGE \
CDEF:cdefd=a,b,c,+,+ \
AREA:b#FFD660:"10 Minute\: 0.31" \
STACK:c#EA8F00:"5 Minute\: 0.34\n" \
STACK:a#FF0000:"1 Minute\: 0.40\n" \
AREA:cdefd#797C6E:"Summe"
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Disregarding the MySQL errors, what happens if you execute that command manually at the command prompt? Does rrdtool give output, or does it give an error?

I'd be curious to see what happens.

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest