problem with CDEFs - "/"

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

Moderators: Developers, Moderators

Post Reply
Ev
Cacti User
Posts: 104
Joined: Tue Jan 25, 2005 12:16 pm

problem with CDEFs - "/"

Post by Ev »

When I wrote CDEF (a,b,c - data form data sources - graph template) , I get wrong result with two operands and / or *.
[variable], [constant], [+,-,*] - right .
[variable], [variable], [+,-,*] - right .
[variable], [variable], / - wrong .

On example, cdef= a,b,+ get right value, a,b,- - right, a,b,/ - wrong!
But a,1000,+ - right.

cacti 0.8.6.c (patched - patches from 31.1.2005).
rrd 1.0.49
php 4.3.10.
mdw162
Posts: 23
Joined: Fri Feb 04, 2005 7:49 pm

Post by mdw162 »

Does this have anything to do with your GPRINT type in the graph template? I think I remember having a problem before when I set the variable type (integer, float, etc.) wrong.
Ev
Cacti User
Posts: 104
Joined: Tue Jan 25, 2005 12:16 pm

Post by Ev »

mdw162 wrote:Does this have anything to do with your GPRINT type in the graph template? I think I remember having a problem before when I set the variable type (integer, float, etc.) wrong.
yes, it prints with GPRINT result of calculations.
Where I can set the variable type ?
I wrote formula in cacti Graph Management -> CDEF -> custom string

can you wrote example of CDEF with typing of variables ?
Ev
Cacti User
Posts: 104
Joined: Tue Jan 25, 2005 12:16 pm

Post by Ev »

Is anyone use CDEF functions with more that one argument and /* ?
mdw162
Posts: 23
Joined: Fri Feb 04, 2005 7:49 pm

Post by mdw162 »

You can set the variable type under GPRINT Presets. The format folllows the fprint/sprint format.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests