special cdef does not calculate at all

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

Moderators: Developers, Moderators

giovanni
Posts: 25
Joined: Sat May 20, 2006 8:06 pm

special cdef does not calculate at all

Post by giovanni »

Hi everyone, let see if any of you can help me :)

I have a graph that uses a special Cdef (calculates saved bandwidth on Squid), when i see the graph on the "main window" the calculate is not made at all, see above:

Image

As you can see, the "Atual:" field (Current field) is not calculated correctly, but when i click on the graph, the problem dissapears. See above:

Image

Now, the deduction of the values works very well.

Any ideas ?
giovanni
Posts: 25
Joined: Sat May 20, 2006 8:06 pm

Post by giovanni »

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Mustang (Firewall) - Squid - Trafego" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=-1 \
--vertical-label="bits / s" \
--slope-mode \
DEF:a="/var/www/joker.redix.com.br/htdocs/cacti/rra/mustang_firewall_serverinkb_396.rrd":serverInKb:AVERAGE \
DEF:b="/var/www/joker.redix.com.br/htdocs/cacti/rra/mustang_firewall_serverinkb_396.rrd":httpOutKb:AVERAGE \
CDEF:cdefa=a,1024,*,8,* \
CDEF:cdefe=b,1024,*,8,* \
CDEF:cdefi=b,a,LT,0,a,b,-,IF,1024,*,8,* \
AREA:cdefa#00CF00:"Entrada (Internet)" \
GPRINT:cdefa:LAST:"Atual\:%8.2lf%s" \
GPRINT:cdefa:AVERAGE:"M
giovanni
Posts: 25
Joined: Sat May 20, 2006 8:06 pm

Post by giovanni »

sorry about the dupplicated posts
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Removed duplicated posts.
Please goto Graph Management, select your Graph, switch on DEBUG mode and post the whole "rrdtool graph" statement.
Then, select your graph from the Graphs Tab and click on it to see all four timespans. Then select the wrench and post the second rrdtool graph statement as well
Reinhard
giovanni
Posts: 25
Joined: Sat May 20, 2006 8:06 pm

Post by giovanni »

Hi lvm, thanks for your quick reply!

So, here we go:

1. At Graph management:
RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Mustang (Firewall) - Squid - Trafego" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=-100000 \
--vertical-label="bits / s" \
--slope-mode \
DEF:a="/dir/cacti/rra/mustang_firewall_serverinkb_396.rrd":serverInKb:AVERAGE \
DEF:b="/dir/cacti/rra/mustang_firewall_serverinkb_396.rrd":httpOutKb:AVERAGE \
CDEF:cdefa=a,1024,*,8,* \
CDEF:cdefe=b,1024,*,8,* \
CDEF:cdefi=b,a,LT,0,a,b,-,IF,1024,*,8,* \
AREA:cdefa#00CF00:"Entrada (Internet)" \
GPRINT:cdefa:LAST:"Atual\:%8.2lf%s" \
GPRINT:cdefa:AVERAGE:"M
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The second one is failing, eh?
Reinhard
giovanni
Posts: 25
Joined: Sat May 20, 2006 8:06 pm

Post by giovanni »

damn, when i post the command i receive a forum error...

So, i paste the output on the attachment !

Cacti version: 0.8.6h
Attachments
output.txt
(2.12 KiB) Downloaded 388 times
giovanni
Posts: 25
Joined: Sat May 20, 2006 8:06 pm

Post by giovanni »

really strange, because the problem only appears then i see the graph on the "Graph" menu... if click on the graph the problem disapears... The problem is that i can't debug how cacti draws the graph there...

Maybe a bug ?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I suppose it's a problem with

Code: Select all

--end=-300 \ 
. You may get the graph statement you're missing when Settings are checked for Web Events. Then you'll find ALL browser actions in your cacti.log file. Search for the rrdtool statement there.
Reinhard
giovanni
Posts: 25
Joined: Sat May 20, 2006 8:06 pm

Post by giovanni »

I see!

New problem then, i've checked:
[x] Web SNMP Messages
[x] Web RRD Graph Syntax
[x] Graph Export Messages

But when i draw the graph, nothing new appears in the log, just poller information... I've already checked for permission problems... (apache users has rw permission, also tested using su - apache)

In your cacti installation this option works ?

The parameter --end=-300 dont seems be the problem because in the "Graph management" menu, when i click in the debug mode and stuff, the graph is also using this option and it works very well ...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

giovanni wrote:The parameter --end=-300 dont seems be the problem because in the "Graph management" menu, when i click in the debug mode and stuff, the graph is also using this option and it works very well ...
Well, my opinion is NOT that this parameter is the problem, but the lack of it may be. The grpahs from your first post do show the problem for CURRENT only! The current entry is denoted "LAST" in rrdtool lingo. And if there's a problem with it (e.g. --end=0), computation may fail
Reinhard
giovanni
Posts: 25
Joined: Sat May 20, 2006 8:06 pm

Post by giovanni »

lvm wrote:
giovanni wrote:The parameter --end=-300 dont seems be the problem because in the "Graph management" menu, when i click in the debug mode and stuff, the graph is also using this option and it works very well ...
Well, my opinion is NOT that this parameter is the problem, but the lack of it may be. The grpahs from your first post do show the problem for CURRENT only! The current entry is denoted "LAST" in rrdtool lingo. And if there's a problem with it (e.g. --end=0), computation may fail
Reinhard
Hum, i got it now...

So, and about Web events, in your cacti, this options logs someething when you create the graphs ?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

giovanni wrote:So, and about Web events, in your cacti, this options logs someething when you create the graphs ?
It should. But according to your problem I just tried on my own, to no avail. And up to now, I didn't solve it. Will let you know asap
Reinhard
giovanni
Posts: 25
Joined: Sat May 20, 2006 8:06 pm

Post by giovanni »

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

Post by gandalf »

Fiddled around a lot with permissions (the httpd's user must have permissions to write to cacti.log!). First, to no avail, even after restarting httpd and restarting my browser. Was giving up. But suddenly, I can see the log output from graph generation ...
So please tweak permissions for cacti.log ...
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests