data template interface bug?

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

Moderators: Developers, Moderators

Post Reply
burn
Posts: 8
Joined: Fri Jul 29, 2011 3:00 am

data template interface bug?

Post by burn »

I created a custom data template [Interface -Traffic]. Basically, i duplicated [Interface - Traffic], that comes bundled, and bumped Maximum Value up to 10^18, nothing more. However, when I create graphs using this data template, i sill get ds[traffic_out].max = 1.0000000000e+09. "Use Per-Data Source Value (Ignore this Value)" is unchecked. I modified heartbeat to 601 to be sure I'm using right template, and it got reflected in rrdtool command, unlike Maximum value. Is that sime kind of a bug? I'm running Cacti version 0.8.7g with PA 2.8.

Code: Select all

Data Source Debug

/usr/bin/rrdtool create \
/usr/share/cacti/rra/apollo_dnt_com_ds_2070.rrd \
--step 300  \
DS:traffic_in:COUNTER:600:0:1000000000 \
DS:traffic_out:COUNTER:601:0:1000000000 \
DS:ds:GAUGE:600:0:1000000000 \
RRA:AVERAGE:0.5:1:350000 \
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: data template interface bug?

Post by noname »

There is a similar(?) issue: http://forums.cacti.net/viewtopic.php?p=215252#p215252

If you performed this command, can you modify max value in the RRD properly?

Code: Select all

rrdtool tune your.rrd --maximum traffic_out:1.0e+18
When I did it (by RRDtool 1.2.23):
% rrdtool tune test.rrd --maximum traffic_out:1.0e+18
% rrdtool info test.rrd
filename = "test.rrd"
rrd_version = "0003"
step = 300
last_update = 1311928845
ds[traffic_in].type = "COUNTER"
ds[traffic_in].minimal_heartbeat = 600
ds[traffic_in].min = 0.0000000000e+00
ds[traffic_in].max = 1.0000000000e+08
ds[traffic_in].last_ds = "1696881536"
ds[traffic_in].value = 2.6782227273e+04
ds[traffic_in].unknown_sec = 0
ds[traffic_out].type = "COUNTER"
ds[traffic_out].minimal_heartbeat = 600
ds[traffic_out].min = 0.0000000000e+00
ds[traffic_out].max = 1.0000000000e+18
ds[traffic_out].last_ds = "3116279750"
ds[traffic_out].value = 8.9518090909e+04
ds[traffic_out].unknown_sec = 0
...
burn
Posts: 8
Joined: Fri Jul 29, 2011 3:00 am

Re: data template interface bug?

Post by burn »

yes, and I already did so. The graph shows correctly. The problem is that I nedd to create lots of graphs with this data template and I would prefer not to tune rrd manually every now and then.
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: data template interface bug?

Post by noname »

Hmmm,
I think if a data template is configured properly, it will reflect to a datasource (RRD file) which is newly created..
(i.e. Modifying data template won't affect to existing datasources)
But is it not always so?
burn
Posts: 8
Joined: Fri Jul 29, 2011 3:00 am

Re: data template interface bug?

Post by burn »

that's what I do. I create a new rrd with a definition of ds[traffic_out].max = 1.0000000000e+18, yet cacti creates it with 1.0000000000e+09
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: data template interface bug?

Post by noname »

Then, try:

A) Set "1000000000000000000" instead of "1.0000000000e+18" in data template & re-create datasource
(like http://forums.cacti.net/viewtopic.php?p=215306#p215306 -- perhaps although you have read them already)

B) Disable limit in data template & RRD file
(like http://forums.cacti.net/viewtopic.php?p=215137#p215137)
burn
Posts: 8
Joined: Fri Jul 29, 2011 3:00 am

Re: data template interface bug?

Post by burn »

noname wrote:Then, try:

A) Set "1000000000000000000" instead of "1.0000000000e+18" in data template & re-create datasource
(like http://forums.cacti.net/viewtopic.php?p=215306#p215306 -- perhaps although you have read them already)

B) Disable limit in data template & RRD file
(like http://forums.cacti.net/viewtopic.php?p=215137#p215137)
a) this is how I did from the beginning
b) Cacti does not allow to save me a template with blank maximum value. I already tuned rrd file so that one particular graph shows correctly. I just don't want to do manual tuning for every graph I'm going to create with that template.

edit: I tried putting 'U' into 'Maximum Value' field and cacti created rrd as

Code: Select all

/usr/bin/rrdtool create \
/usr/share/cacti/rra/bgp_ds_2109.rrd \
--step 300  \
DS:traffic_in:COUNTER:600:0:10000000 \
DS:traffic_out:COUNTER:600:0:10000000 \
DS:ds:GAUGE:600:0:10000000 \
RRA:AVERAGE:0.5:1:350000 \
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: data template interface bug?

Post by noname »

burn wrote: b) Cacti does not allow to save me a template with blank maximum value.
Oops, sorry.
Then, if you set "0" (instead blank) to maximum value in data template,
what do you see in RRD (newly created)?
(And is its graph OK?)
burn
Posts: 8
Joined: Fri Jul 29, 2011 3:00 am

Re: data template interface bug?

Post by burn »

noname wrote:
burn wrote: b) Cacti does not allow to save me a template with blank maximum value.
Oops, sorry.
Then, if you set "0" (instead blank) to maximum value in data template,
what do you see in RRD (newly created)?
(And is its graph OK?)
same as with "U":

Code: Select all

/usr/bin/rrdtool create \
/usr/share/cacti/rra/bgp_ds_2130.rrd \
--step 300  \
DS:traffic_in:COUNTER:600:0:10000000 \
DS:traffic_out:COUNTER:600:0:10000000 \
DS:ds:GAUGE:600:0:10000000 \
RRA:AVERAGE:0.5:1:350000 \
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: data template interface bug?

Post by noname »

burn wrote:
noname wrote: Then, if you set "0" (instead blank) to maximum value in data template,
what do you see in RRD (newly created)?
(And is its graph OK?)
same as with "U":

Code: Select all

/usr/bin/rrdtool create \
/usr/share/cacti/rra/bgp_ds_2130.rrd \
--step 300  \
DS:traffic_in:COUNTER:600:0:10000000 \
DS:traffic_out:COUNTER:600:0:10000000 \
DS:ds:GAUGE:600:0:10000000 \
RRA:AVERAGE:0.5:1:350000 \
It's odd.. Where "10000000" comes from?

UPDATE: "rrd_maximum" seems to restrict that parameter.
(I never thought about this..)

Image

If you delete rrd_maximum from "Suggested Values" in data query,
you can specify larger value than 10000000.
And, if you set "0", then the maximum value of RRD files will be "U".

NOTICE: Probably due to precision of variables or something, you cannot set so large (long?) value in data template from GUI.
When I set "1000000000000000000" (1.0e+18), generated RRD file shows "ds[traffic_in].max = 1.0000000000e+17".
I think, in data template it's better to set "0" (=U) instead of large value.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest